1843: 【CSP函数递归】统计每个月兔子的总数▅
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:3
Solved:3
Description
有一对兔子,从出生后第 3 个月起每个月都生一对兔子,一对小兔子长到第三个月后每个月又生一对兔子,假如兔子都不死。
问第 n 个月( n≤30 )的兔子总数为多少对?
Input
输入 1 个整数 n ,表示第几个月。
Output
第 n 个月兔子的总数量有多少对?
Sample Input Copy
9
Sample Output Copy
34