#C14447. Fibonacci Sequence Generator
Fibonacci Sequence Generator
Fibonacci Sequence Generator
In this problem, you are required to generate the first ( n ) numbers of the Fibonacci sequence. The Fibonacci sequence is defined as follows: ( F_0 = 0 ), ( F_1 = 1 ) and for all ( i \ge 2 ), ( F_i = F_{i-1} + F_{i-2} ).
Given a non-negative integer ( n ), output the first ( n ) Fibonacci numbers, separated by a single space. For example, if ( n = 5 ), the output should be: 0 1 1 2 3.
inputFormat
The input consists of a single line containing an integer ( n ) (0 ( \le n \le 10^5 )), which indicates how many numbers of the Fibonacci sequence to generate.
outputFormat
Output the first ( n ) Fibonacci numbers separated by a single space on one line. If ( n = 0 ), output nothing.## sample
1
0