#C5631. Cakes Triangle

    ID: 49302 Type: Default 1000ms 256MiB

Cakes Triangle

Cakes Triangle

You are given T test cases. For each test case, you are given an integer N representing the number of cakes. Your task is to print a triangular arrangement of cakes where the ith row contains i cakes. Each cake is represented by the uppercase letter C and cakes within the same row are separated by a single space.

For example, if N = 3, the output should be:

C
C C
C C C

For multiple test cases, the triangular outputs should be separated by a blank line. Use the standard input and output for reading the input and printing the result.

The mathematical formulation for the number of cakes in the ith row is given by:

\( i,\; 1\leq i \leq N \)

inputFormat

The first line of input contains a single integer T, the number of test cases. This is followed by T lines, each containing a single integer N, which is the number of rows (cakes) to be printed in the corresponding test case.

For example:

3
2
4
6

Here, T = 3 and the three test cases have N=2, N=4, and N=6 respectively.

outputFormat

For each test case, output a triangle where the ith row consists of i occurrences of the letter C separated by a single space. Separate the output of different test cases by a blank line.

For the sample input above, the output should be:

C
C C

C
C C
C C C
C C C C

C
C C
C C C
C C C C
C C C C C
C C C C C C
## sample
1
1
C