HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Recursion > problem:


50725 - Fibonacci Series

Guest
• Review clarifications (1)

Section problems

• 50911 - Symmetric Array
• 50381 - Sum of the numbers
• 51081 - Fish Pond I
• 50935 - Max Discount
• 50724 - Number of Circles
• 50729 - Max number in 2D array
• 50928 - War Of Battleships
• 50577 - Perfect Numbers and Perfec...
• 50725 - Fibonacci Series
• 50370 - Number of rectangles in a ...
• 50376 - Sequences
• 50421 - Repairing road segments
• 50389 - Reverse an Array
• 50727 - Fibonacci Numbers
• 50726 - Pascal Triangle - 1
• 50475 - Voice advertising
• 50721 - Palindrome

Feedback

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

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


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

www.contester.ru