2523: 斐波那契数列(Fibonacci) [1*+] 递归

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:46 Solved:21

Description

斐波那契数列(Fibonacci)
【问题】f[0]=0,f[1]=1,f[n]=f[n-1]+f[n-2]。用递归的方法计算f[n]

Input

【输入】n

Output

【输出】f[n]

Sample Input Copy

5

Sample Output Copy

5

HINT

【限制】n<=40

Source/Category