1037. Tri Tiling

单点时限: 2.0 sec

内存限制: 256 MB

In how many ways can you tile a 3xn rectangle with 2x1 dominoes?

Here is a sample tiling of a 3x12 rectangle.

输入格式

Input consists of several test cases followed by a line containing -1. Each test case is a line containing an integer 0 ≤ n ≤ 30.

输出格式

For each test case, output one integer number giving the number of possible tilings.

样例

Input
2
8
12
-1
Output
3
153
2131

49 人解决,79 人已尝试。

57 份提交通过,共有 135 份提交。

4.4 EMB 奖励。

创建: 18 年,12 月前.

修改: 7 年,3 月前.

最后提交: 1 年,5 月前.

来源: N/A

题目标签