By M.C. Pinto, UNILA Brazil
Binet's formula is a way to calculate Fibonacci numbers.
Your task is, given a natural number n, to compute the value of Fibonacci(n) using the formula above.
The input is a natural number n (0 < n ≤ 50).
The output is the value of Fibonacci(n) with 1 decimal place using the given Binet's formula.
Input Samples | Output Samples |
1 |
1.0 |
2 |
1.0 |
3 |
2.0 |