#43Easy
Squares from odd numbers
Time: 1 s · Memory: 256 MB
- Loops
Statement
You are given a natural number . Print the squares of the numbers from to , building them by adding odd numbers:
That is, , , , and so on.
Input format
A single integer ().
Output format
A single line with numbers: .
Examples
Input
4
Output
1 4 9 16
Input
1
Output
1
Note
On each step add the next odd number to the previous square: on step it is . No multiplication is needed — a loop and one running sum are enough.
