Docoding OJ
Home
ProblemSet
Source/Category
Contest
Status
Ranklist
F.A.Qs
Login
Register
2112: 【信息学奥赛一本通】昆虫繁殖
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:163
Solved:77
Submit
Submit Record
Statistics
ShowOff!
Description
科学家在热带森林中发现了一种特殊的昆虫,这种昆虫的繁殖能力很强。每对成虫过x个月产y对卵,每对卵要过两个月长成成虫。假设每个成虫不死,第一个月只有一对成虫,且卵长成成虫后的第一个月不产卵(过X个月产卵),问过Z个月以后,共有成虫多少对?0≤X≤20,1≤Y≤20,X≤Z≤50。
Input
x,y,z的数值。
Output
过Z个月以后,共有成虫对数。
Sample Input
Copy
1 2 8
Sample Output
Copy
37
Source/Category
算法
钻石
递推
Submit
Submit Record
Statistics
ShowOff!