中文
English
Toggle navigation
YSACODE
F.A.Qs
Web Board
ProblemSet
Source/Category
Status
Ranklist
Contest
[
ProblemSet
Status
Ranklist
OI Ranklist
Statistics
]
Login
Problem B: 斐波那契数列
Problem B: 斐波那契数列
Time Limit:
1 Sec
Memory Limit:
128 MB
Submit:
56
Solved:
40
[
Submit
] [
Status
] [
Web Board
] [Creator:
]
Description
斐波那契数列0,1,1,2,3,5,8,13,21,34,55……从第三项起,每一项都是紧挨着的前两项的和。写出计算斐波那契数列任意一个数据项的递归程序。
Input
所求项数
Output
数据项的值
Sample Input
Copy
10
Sample Output
Copy
34