#K1741. Construct Equal Sum Sequence
Construct Equal Sum Sequence
Construct Equal Sum Sequence
Given a positive integer n, construct a sequence A of length 2n such that the sum of every n consecutive numbers is the same. In other words, let the sequence be \( A_1, A_2, \dots, A_{2n} \), and we require that:
[ \sum_{i=1}^{n} A_i = \sum_{i=n+1}^{2n} A_i ]
A simple solution is to create a sequence by concatenating the list of integers from 1 to n with itself, i.e., \( [1, 2, \dots, n, 1, 2, \dots, n] \). This guarantees that both halves have the same sum.
inputFormat
The input is provided via standard input (stdin) and consists of a single integer n on one line, where n is the length of half of the desired sequence.
outputFormat
The output should be printed to standard output (stdout) as a single line containing 2n integers separated by a space. The sequence should be such that the sum of the first n numbers is equal to the sum of the last n numbers.
## sample1
1 1
</p>