爱迪国际
Home
ProblemSet
Source/Category
Contest
Status
Ranklist
F.A.Qs
HelloWorld!
Login
Register
1236: 【入门】统计每个月兔子的总数
Memory Limit:16 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:19
Solved:18
Submit
Submit Record
Statistics
ShowOff!
Description
有一对兔子,从出生后第3个月起每个月都生一对兔子,一对小兔子长到第三个月后每个月又生一对兔子,假如兔子都不死,问第n个月(n<=50)的兔子总数为多少对?
Input
输入1个整数n,表示第几个月
Output
第n个月兔子的总数量有多少?
Sample Input
Copy
9
Sample Output
Copy
34
Source/Category
递归
递推
Submit
Submit Record
Statistics
ShowOff!