~/algor $ cat problems/massiv-fibonachchi-ketma-ketligi
Array of Fibonacci numbers
Easy
1000 ms
128 MB
26%
A positive integer $n$ is given. Build and print the array of the first $n$ Fibonacci numbers:
$$F_{1} = 1, \quad F_{2} = 1, \quad F_{k} = F_{k-1} + F_{k-2}$$
Input
One positive integer $n$.
Output
One line with $n$ Fibonacci numbers separated by spaces.
Note
$1 \le n \le 40$
Examples
Input #1
6
Output #1
1 1 2 3 5 8
Input #2
2
Output #2
1 1