• 1923 Tri Tiling

    时间限制 : 2000/1000 MS(Java/Others) | 内存限制 : 131072/65536 KB(Java/Others)

    提交数 : 49 | 通过数 : 27

    题目描述

    
    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. 
    

    输入样例

    2
    8
    12
    -1
    

    输出样例

    3
    153
    2131
    

    提示


    来源


    [ 返回顶端 ] | [ 代码提交 ] | [ 统计数据 ] | [ 历史提交 ]