ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Сборники > Chapter 3. Repetition structures > задача:


07. Fibonacci Series

Задачи сборника

• Flowchart 3
• Sum less than N
• Sum of N numbers
• 01. How many digits?
• 02. How many divisors?
• 04. Поезд
• 05. Factorial
• 06. X to the power of Y
• 07. Fibonacci Series
• 08. Binary to decimal
• 09. Decimal to binary
• 10. Maximum
• 11. Perfect numbers
• 12. Wonder primes
• 13. Round numbers
• 14. Tower of Happiness
• 2. Molecules

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 1000/1000/1000/1000 мс. Лимит памяти 65000/65000/65000/65000 Кб.

Problem description

The Fibonacci series begins with 0 and 1 and has the property that each subsequent Fibonacci number is the sum of the previous two Fibonacci numbers. Some of the first Fibonacci numbers are 0, 1, 1, 2, 3, 5, 8, 13, … Make a program to print the first N Fibonacci numbers where N is a positive integer.

Input

There is a single integer N on the first line of input (1 ≤ N ≤ 90).

Output

Print first N Fibonacci numbers

Example

stdin stdout

8

0 1 1 2 3 5 8 13

Для отправки решений необходимо выполнить вход.

www.contester.ru