#K16201. Taco Code Sequence
Taco Code Sequence
Taco Code Sequence
You are given an integer n, and you need to generate a special code sequence based on n. The code sequence is formed by first concatenating all integers from 1 to n and then appending all integers from n-1 down to 1. For example, if n = 3 then the sequence is 12321. The task is to handle multiple test cases.
Note: All mathematical expressions are to be considered in LaTeX format. In particular, if n is provided, the sequence can be expressed as: (S(n)=1,2,3,...,,n-1, n, n-1, ..., 3, 2, 1).
inputFormat
The first line of input contains an integer T, representing the number of test cases. Each of the following T lines contains a single integer n. You need to process each test case independently.
Example:
3 1 2 3
outputFormat
For each test case, output the corresponding code sequence on a new line. Ensure that there are no extra spaces or characters.
Example:
1 121 12321## sample
3
1
2
3
1
121
12321
</p>