No.2610 Decreasing LCMs
Problem Statement
You are given an integer $N$. Print $1$ sequence $A = \left( A_1 , A_2 , \cdots A_N \right)$ of $N$ integers, each at least $1$, that satisfies all of the following $3$ conditions.
- For each integer $i$ satisfying $1 \leq i \leq N$, $A_i \leq 10^8$.
- For each integer $i$ satisfying $1 \leq i \leq N-1$, $A_i < A_{i+1}$.
- For each integer $i$ satisfying $1 \leq i \leq N-2$, $\mathrm{LCM} (A_i,A_{i+1}) > \mathrm{LCM} (A_{i+1},A_{i+2})$. (Here, $\mathrm{LCM} (x,y)$ denotes the least common multiple of $x$ and $y$.)
It can be proved that a sequence satisfying the conditions exists under the constraints of this problem.
Input
$N$
- $3 \leq N \leq 25$
- All inputs are integers.
Output
Print the elements of the sequence on one line, separated by spaces, in the following format, and end with a newline.
If there are multiple solutions satisfying the conditions, you may print any of them.
$A_1\ \ A_2\ \ \cdots A_N$
Sample
Sample 1
Input
3
Output
21 24 144
The $1$st and $2$nd conditions are clearly satisfied.
Since $\mathrm{LCM} (21,24) =168,\mathrm{LCM} (24,144) =144$, we can see that the $3$rd condition is also satisfied.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
蜜蜂