Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb. Prepared by Halil Karimis.
Fibonacci Series
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, 21, 34, 55, 89, 144 …
Make a program to print the first N (0< N <40) Fibonacci numbers where N is a positive integer.
Input specification
There is a single integer N on the first line of input.
Output specification
Print first N Fibonacci numbers
Sample Input I
4
|
Sample Input II
10
|
Sample Output I
0 1 1 2
|
Sample Output II
0 1 1 2 3 5 8 13 21 34
|
Для отправки решений необходимо выполнить вход.
|