#C10166. Pyramid of Numbers
Pyramid of Numbers
Pyramid of Numbers
Given a positive integer n, output a pyramid of numbers with n rows. The pyramid is constructed such that the first row contains the number 1, the second row contains the next two consecutive numbers, the third row the next three, and so on.
Formally, the pyramid follows the pattern below:
$$ \begin{aligned} 1\\ 2\ 3\\ 4\ 5\ 6\\ \vdots \end{aligned} $$Each number in a row is separated by a single space, and each row is separated by a newline character.
inputFormat
The input is provided via standard input (stdin) as a single integer n (1 ≤ n ≤ 1000).
outputFormat
Output to standard output (stdout) the pyramid of numbers with n rows as described. Ensure that the numbers in each row are separated by a single space and each row ends with a newline character (except possibly the last row).
## sample1
1