joj1277
来源:互联网 发布:门面招牌设计软件 编辑:程序博客网 时间:2024/06/07 13:39
1277: Fibonacci Freeze
The Fibonacci numbers (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ...) are defined by the recurrence:
Write a program to calculate the Fibonacci Numbers.
Input and Output
The input to your program would be a sequence of numbers smaller or equal than 500, each on a separate line, specifying which Fibonacci number to calculate.
Your program should output the Fibonacci number for each input value, one per line.
Sample Input
5711
Sample Output
The Fibonacci number for 5 is 5The Fibonacci number for 7 is 13The Fibonacci number for 11 is 89
This problem is used for contest: 111
Submit / Problem List / Status / Discuss