Pro.ID10052 TitleFunction Title链接http://10.20.2.8/oj/exercise/problem?problem_id=10052 AC78 Submit257 Ratio30.35% 时间&空间限制描述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 提示作者 |