题目描述
<img src=http://acm.student.cs.uwaterloo.ca/~acm00/050924/domino.jpg> <p>In how many ways can you tile a 3x<em>n</em> rectangle with 2x1 dominoes?</p> <p>Here is a sample tiling of a 3x12 rectangle.</p> <p> </p> <center> <img src="http://acm.student.cs.uwaterloo.ca/%7Eacm00/050924/D.gif" alt="" /> </center> <p>Input consists of several test cases followed by a line containing <i>-1</i>. Each test case is a line containing an integer <em>0 ≤ n ≤ 30</em>. For each test case, output one integer number giving the number of possible tilings.</p>
输入格式
输出格式
样例
样例输入 1
2
8
12
-1
样例输出 1
3
153
2131
提交代码
请先登录后提交
🤖 AI 解题助手
DeepSeek
就绪