2018级 1/2/中澳班 第二次上机测试
Problem B: Fibonacci Numbers
- Descpription
A Fibonacci sequence is calculated by adding the pervious two members of the sequence, with the first two members being both 1.
f ( 1 ) = 1 , f ( 2 ) = 1 , f ( n > 2 ) = f ( n − 1 ) + f ( n − 2 ) f(1)=1,f(2)=1,f(n>2)=f(n-1)+f(n-2) f(1)=1,f(2)=1,f(n>2)=f(n−1)+f(n−2)
Your task is to take a number as input, and print that fibonacci number.
- Input Format
A singal number indicates n n n.
- Output Format
A singal line indicates f ( n ) f(n) f(n).
- Simple Input
100 100 100
- Simple Output
354224848179261915075 354224848179261915075 354