#À. 斐波那契数列Plus
斐波那契数列Plus
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Background
大家都知道,斐波那契数列是满足如下性质的一个数列:
$$F_n = \begin{cases} 0& \text{if }n\text{== \ 0} \\ 1, & \text{if }n\text{<= \ 2} \\ F_{n-1} + F_{n-2}, & \text{if }n\text{ > \ 2} \end{cases} $$请你求出 的值。
Description
一行一个整数 n
Format
Input
输出一行一个整数表示答案。
Output
One integer, the sum of x and y.
Samples
5
5
Limitation
【数据范围】 对于 的数据,; 对于 的数据,。
=>第七届SWPU-ACM老生预选赛
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 187
- Start at
- 2022-9-19 14:00
- End at
- 2022-10-28 14:00
- Duration
- 936 hour(s)
- Host
- Partic.
- 45