#K85512. Taco Sequence Generator
Taco Sequence Generator
Taco Sequence Generator
Given a positive integer N, generate a sequence where the i-th term is the sum of the first i natural numbers. In other words, the sequence is defined as follows:
\(a_i = 1 + 2 + \cdots + i = \frac{i(i+1)}{2}\)
You will be given multiple test cases. For each test case, output a single line containing the generated sequence with each term separated by a space.
inputFormat
The input is read from stdin and consists of multiple test cases. The first line contains an integer T, the number of test cases. The following T lines each contain a single integer N, representing the number of terms to generate for that test case.
outputFormat
For each test case, output on a separate line the sequence of sums. The i-th term of the sequence is the sum of the first i natural numbers. Each term should be separated by a single space, and the output is written to stdout.## sample
3
3
5
2
1 3 6
1 3 6 10 15
1 3
</p>