HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Recursion > problem:


50725 - Fibonacci Series

Guest
• Review clarifications (1)

Section problems

• 50723 - Tribonacci
• 50370 - Number of rectangles in a ...
• 50475 - Voice advertising
• 50909 - Gold Coins
• 50376 - Sequences
• 50725 - Fibonacci Series
• 50385 - The 3n + 1 problem
• 50911 - Symmetric Array
• 50381 - Sum of the numbers
• 50389 - Reverse an Array
• 50727 - Fibonacci Numbers
• 50415 - The Scientist
• 50421 - Repairing road segments
• 50935 - Max Discount

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