問題一覧 > 通常問題

No.2610 Decreasing LCMs

レベル : / AI推定難易度 : 1750 / 実行時間制限 : 1ケース 1.000秒 / メモリ制限 : 512 MB / スペシャルジャッジ問題 (複数の解が存在する可能性があります)
タグ : (AC するまで非表示) / 解いたユーザー数 72
作問者 : 蜜蜂 / テスター : Mitarushi
お気に入りにしたユーザー ProblemId : 6246 / 自分の提出
問題文最終更新日: 2024-01-19 15:13:20
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 415 (順位表) の他の問題:

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もしくは右上の雲マークをクリックしてアカウントを作成してください。