#p30. 斐波那契数列项
斐波那契数列项
Description
输入一个正整数 n,输出斐波那契数列的第 n 项(数列从1开始:第1项=1,第2项=1,第3项=2,依此类推)。
1 1 2 3 5 8 ……
Format
Input
One integer n, satisfying
Output
One integer
Samples
5
5
Limitation
Related
In following contests:
输入一个正整数 n,输出斐波那契数列的第 n 项(数列从1开始:第1项=1,第2项=1,第3项=2,依此类推)。
1 1 2 3 5 8 ……
One integer n, satisfying 1≤n≤30
One integer
5
5
1≤n≤30
In following contests:
By signing up a 信息学竞赛 universal account, you can submit code and join discussions in all online judging services provided by us.