当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。
A Fibonacci sequence is calculated by adding the previous 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)
Your task is to take a number as input, and print that fibonacci number.
100
354224848179261915075
100
354224848179261915075
No generated fibonacci number in excess of 1000 digits will be in the test data, i.e. f (20) = 6765
has 4 digits.
时间上限 | 内存上限 |
1000 MS | 128 MB |