#K58497. First N Fibonacci Sequence
First N Fibonacci Sequence
First N Fibonacci Sequence
You are given a single integer n. Your task is to compute the first n elements of the Fibonacci sequence. The Fibonacci sequence is defined as follows:
\(F_0 = 0\), \(F_1 = 1\) and for \(n \geq 2\), \(F_n = F_{n-1} + F_{n-2}\).
For example, if n is 5, the first five Fibonacci numbers are: 0, 1, 1, 2, 3.
If the given number is less than or equal to 0, the output should be empty (i.e., nothing is printed).
inputFormat
The input consists of a single integer n provided via standard input.
\(n\) is an integer and can be zero or negative. When \(n \le 0\), no output should be produced.
outputFormat
Output the first n Fibonacci numbers separated by a space to the standard output. If \(n \le 0\), do not output anything.
## sample5
0 1 1 2 3
</p>