QOJ.ac

QOJ

時間限制: 1.0 s 記憶體限制: 512 MB 總分: 100 难度: [顯示]

#7054. 斐波那契数列

统计

斐波那契数列是一个自然数序列,定义如下:

  • $F_1 = 1$;
  • $F_2 = 1$;以及
  • $F_n = F_{n-1} + F_{n-2}$,对于 $n > 2$。

编写一个程序,输出斐波那契数列的前 5 个数。

输入格式

本题没有输入。

输出格式

输出 5 个整数,表示斐波那契数列的前 5 个数。输出中任意两个相邻的数字之间用一个空格隔开,行末不包含多余的空格或符号。

样例

输入 1

(no input)

输出 1

1 1 2 3 5

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.