#K89402. Iterative Fibonacci Sequence
Iterative Fibonacci Sequence
Iterative Fibonacci Sequence
Given a positive integer n, generate the first n Fibonacci numbers using an iterative approach. The sequence starts with the first Fibonacci number as 1 and the second as 1. For any input n ≤ 0, output nothing.
Note: The Fibonacci numbers are defined as: \( F(1) = 1, F(2) = 1 \) and for \( n \geq 3, F(n)=F(n-1)+F(n-2) \).
inputFormat
The input consists of a single integer n provided via stdin, where 0 ≤ n ≤ 10^3.
outputFormat
Output the first n Fibonacci numbers separated by a single space to stdout. If n is not positive, output nothing.
## sample1
1