#P1962. 斐波那契数列
斐波那契数列
Description
As we all know, the Fibonacci sequence is defined by the following properties:
$$F_n = \left\{\begin{aligned} 1 \space (n \le 2) \\ F_{n-1}+F_{n-2} \space (n\ge 3) \end{aligned}\right.$$Please compute the value of .
Input Format
A single line containing a positive integer .
Output Format
Output a single integer on one line representing the answer.
5
5
10
55
Hint
Constraints
For 60% of the testdata, .
For 100% of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号