6259: Function

内存限制:128 MB 时间限制:1.000 S
评测方式:文本比较 命题人:
提交:1 解决:0

题目描述

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).

输出

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

样例输入 复制

1 1 3

样例输出 复制

2.000000

来源/分类