Responsive image

问题 1048 --Fibonacci Numbers

1048: Fibonacci Numbers

时间限制: 1 Sec  内存限制: 128 MB
提交: 11  解决: 3
[提交][状态][讨论版][命题人:]

题目描述

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.

来源

[提交][状态]
ACM算法攻关部
  • Anything about this OnlineJudge, Please Contact Administrator. Click add QQ

    OJ system based on HUSTOJ Project , UI based on Twitter Bootstrap

    Copyright 2016 ACM算法攻关部
    关于网站改版