#K40597. Pyramid Generation

    ID: 26677 Type: Default 1000ms 256MiB

Pyramid Generation

Pyramid Generation

Given an integer N, your task is to generate a numeric pyramid of height N. The pyramid is constructed such that the first row has 1 number, the second row has 2 numbers, the third row has 3 numbers, and so on. The numbers in the pyramid are consecutive starting from 1.

For example, when \(N = 3\), the pyramid is:

[ \begin{array}{c} 1 \ 2 ; 3 \ 4 ; 5 ; 6 \end{array} ]

You are also given multiple test cases. For each test case, print the corresponding pyramid. Separate the outputs for different test cases by a blank line.

inputFormat

The first line of input contains an integer T representing the number of test cases. The following T lines each contain a single integer N, the height of the pyramid for that test case.

Input Format:

T
N1
N2
...
NT

outputFormat

For each test case, output the pyramid of height N. Each level of the pyramid should be printed on a new line with numbers separated by a single space. If there are multiple test cases, separate the output of consecutive test cases with an empty line.

## sample
1
1
1