2307 - A easy problem!

通过次数

0

提交次数

0

时间限制 : 1 秒 内存限制 : 128 MB


<span style="line-height:1.5;"><span style="font-family:'Microsoft Yahei';font-size:14px;line-height:21px;background-color:#F5F5F5;">Define&nbsp;a&nbsp;function&nbsp;f(n)=(f(n-1)+1)/f(n-2).&nbsp;You&nbsp;already&nbsp;got&nbsp;f(1)&nbsp;and&nbsp;f(2).&nbsp;Now,&nbsp;give&nbsp;you&nbsp;a&nbsp;number&nbsp;m,&nbsp;please&nbsp;find&nbsp;the&nbsp;value&nbsp;of&nbsp;f(m).</span></span>

<br />

题目输入

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

题目输出


<span style="font-family:'Microsoft Yahei';font-size:14px;line-height:28px;background-color:#F5F5F5;">For&nbsp;each&nbsp;case,&nbsp;please&nbsp;output&nbsp;the&nbsp;value&nbsp;of&nbsp;f(m),&nbsp;rounded&nbsp;to&nbsp;6&nbsp;decimal&nbsp;places.</span>

输入/输出样例

输入格式

1 1 3
1 2 3
4 8 10

输出格式

2.000000
3.000000
0.625000