Number Triangle
Submit solution
Points:
100
Time limit:
2.0s
Memory limit:
256M
Author:
Problem types
Allowed languages
C++, Python
Print a number triangle with \(n\) rows. Row \(i\) contains the integers from \(1\) through \(i\).
Input
One integer \(n\).
The input satisfies:
- \(1 <= n <= 100\)
Output
Print the rows with adjacent numbers separated by one space.
Example
Input
5
Output
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
Comments