菲波那契数

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.

【题目描述】

菲波那契数列是指这样的数列: 数列的第一个和第二个数都为1,接下来每个数都等于前面2个数之和。给出一个正整数k,要求菲波那契数列中第k个数是多少。

【输入】

输入一行,包含一个正整数k。(1 ≤ k ≤ 46)

【输出】

输出一行,包含一个正整数,表示菲波那契数列中第k个数的大小。

【输入样例】

19

【输出样例】

4181

【来源】

一本通在线评测

大明

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
38
Start at
2025-2-11 16:00
End at
2025-2-28 8:00
Duration
400 hour(s)
Host
Partic.
7