All Submissions


Problem Statement
Write a program to generate the Fibonacci Series upto N terms for all N > 0.

Input Output Specifications

  • Each line of the input file contains a single positive integer N, 0 <= N <= 40.

  • You must keep reading the input till EOF. There is more than one input.

  • Corresponding to each input integer, print out the Fibonacci Series up to N terms.

  • Each number should be followed by a space.


Sample Input
2
3
5

Sample Output
1 1
1 1 2
1 1 2 3 5

Problem Setter: Kaustubh Karkare

Languages: C,C++,Java

Time Limit: 3 Second(s)
Score: 100 Point(s)
Input File Limit: 50000 Bytes

Submit

Login to post clarification.

ascii767:
Q. You should print a space after each number(even the last one) or you get PE

A. Thanks updated problem statement. :)

Contest

Mode Judge

Passive

Online

Overall Rankings

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0