21398_FibonacciNumbers

2022-5-16 18:19| 发布者: Hocassian| 查看: 45| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-4-89505231999100-Problem List-采集的数据-后羿采集器.html

Pro.ID

21398

Title

Fibonacci Numbers

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=21398

AC

52

Submit

122

Ratio

42.62%

时间&空间限制

  • Time Limit: 1000/500 MS (Java/Others)     Memory Limit: 32768/32768 K (Java/Others)
  • 描述

    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.

    输入

    One integer i

    输出

    Description

    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.

    Input

    One integer i

    Output

    Output the i-th Fibonacci number.

    Sample Input

    100

    Sample Output

    354224848179261915075

    Hint

    No generated Fibonacci number in excess of 1000 digits will be in the test data, i.e. f(20) = 6765 has 4 digits.

    Source

    样例输入

    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.


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部