Different Pairwise Sums#2880

Different Pairwise Sums

1 sekunda
8 megabajtov
Težko

Given a natural number . Construct a sequence of distinct natural numbers a_1, a_2, \ldots, a_n, each not exceeding 2n^2 + 4n, such that all pairwise sums are different. In other words, all \frac{n(n-1)}{2} numbers of the form a_i + a_j, where 1 \leq i < j \leq n, must be distinct. It is guaranteed that such a sequence exists.

Vhod

The input contains a single line with the natural number (1 \leq n \leq 5000).

Izhod

Output a single line with the numbers a_1, a_2, \ldots, a_n separated by spaces. If there is more than one valid sequence, you may output any one of them.

Primeri

Primer 1

Loading
Loading