#P1720. 月落乌啼算钱(斐波那契数列)

    ID: 683 远端评测题 1000ms 125MiB 尝试: 9 已通过: 5 难度: 1 上传者: 标签>模拟数学递推洛谷原创斐波那契,Fibonacci

月落乌啼算钱(斐波那契数列)

Description

After paying, Yue Luo Wu Ti thought, "You ripped me off!" So when Ai Yu Chou asked how much it cost, Yue Luo Wu Ti replied with a bunch of gibberish. Ai Yu Chou said, "Forget it, I only ask: what is the price of the nn-th dish?" Yue Luo Wu Ti wrote:

$$F_n=\dfrac{\left(\frac{1+\sqrt{5}}{2}\right)^n-\left(\frac{1-\sqrt{5}}{2}\right)^n}{\sqrt{5}}$$

Since Ai Yu Chou had studied programming, he computed FnF_n in 11 minute. Yue Luo Wu Ti was shocked. Can you, like Ai Yu Chou, compute the value of FnF_n?

Input Format

One line containing a non-negative integer nn.

Output Format

One line containing a real number FnF_n, with two decimal places.

6
8.00

Hint

For all testdata: 0n480 \leq n \leq 48.

Translated by ChatGPT 5