Page not loading? Try clicking here.
Placeholder

#5946

Number triangle 2 1s 32MB

Problems

Given the height 𝑛 of a triangle, write a program that prints the triangle in the specified numeric pattern.


Input

The triangle height 𝑛 is given.

𝑛 is an odd integer not exceeding 50.


Output

Print the triangle with height n. Numbers in each row are separated by a space.

If the input value is outside the specified range, output INPUT ERROR!.


Example #1

3
0 0 0 0 0
1 1 1
2

Example #2

7
0 0 0 0 0 0 0 0 0 0 0 0 0 
1 1 1 1 1 1 1 1 1 1 1
2 2 2 2 2 2 2 2 2
3 3 3 3 3 3 3
4 4 4 4 4
5 5 5
6


Source

JUNGOL

You must sign in to write code.