#54Easy
Multiplication table
Time: 1 s · Memory: 256 MB
- Nested loops
Statement
You are given a natural number . Print the multiplication table: the -th number of row is .
Input format
A single integer ().
Output format
lines, each with numbers separated by spaces.
Examples
Input
3
Output
1 2 3 2 4 6 3 6 9
Input
1
Output
1
Note
The outer loop goes over rows and the inner loop over the numbers in a row. When the inner loop ends, move to a new line. In the first example the rows are 1 2 3, 2 4 6, 3 6 9.
