10052_Function

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

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

Pro.ID

10052

Title

Function

Title链接

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

AC

78

Submit

257

Ratio

30.35%

时间&空间限制

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

    Define a function f (n) = ( f (n-1) + 1 ) / f (n-2). You already got f (1) and f (2).

    Now, give you a number m, please find the value of f (m).

    输入

    There are several test cases. Each case contains three integers indicating f (1), f (2) and m ( 1 ≤ f (1), f (2), m ≤ 1000,000,000 ).

    输出

    Description

    Define a function f (n) = ( f (n-1) + 1 ) / f (n-2). You already got f (1) and f (2).

    Now, give you a number m, please find the value of f (m).

    Input

    There are several test cases. Each case contains three integers indicating f (1), f (2) and m ( 1 ≤ f (1), f (2), m ≤ 1000,000,000 ).

    Output

    For each case, please output the value of f (m), rounded to 6 decimal places.

    Sample Input

    1 1 3

    Sample Output

    2.000000

    样例输入

    1 1 3

    样例输出

    2.000000

    提示

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部