HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


Fibonacci Series

Section problems

• Rectangle
• Bfs
• Chess
• Big Dance
• Binary to decimal
• Circle
• City Tour
• Dijkstra
• Fibonacci Series
• Find the biggest 2
• Find the biggest 3
• Sign
• Timer
• Tickets
• find the numbers
• Flowers
• Flowchart 1

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 1000/1000/1000/1000 ms. Memory limit 65000/65000/65000/65000 Kb.

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