問題一覧 > 通常問題

No.3159 Just Answer 10 Integers!

レベル : / AI推定難易度 : 900 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / スペシャルジャッジ問題 (複数の解が存在する可能性があります)
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 92
作問者 : butsurizuki / テスター : 👑 みうね 👑 kencho kmmtkm fluorine jastaway tatesoto TKTYI
お気に入りにしたユーザー ProblemId : 12233 / 自分の提出
問題文最終更新日: 2025-05-23 19:01:29
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
KCPC新歓杯 -Happy Birthday physics0523- (順位表) の他の問題:

Problem Statement

For a set $S = \{S_1,S_2,...S_N\}$ of distinct positive integers of size $N$ ( $2 \le N \le 10$ ), define its score as follows.

Intuitively, the score of $S$ is the number of distinct values that ${\rm lcm}(S_i,S_j)$ ( $1 \le i < j \le N$ ) can take.
The formal definition is as follows.

  • The score of $S$ is the number of integers $m$ satisfying the following condition.
    • There exist integers $i,j$ ( $1 \le i < j \le N$ ) such that $m = {\rm lcm}(S_i,S_j)$.
    • Here, ${\rm lcm}(x,y)$ denotes the least common multiple of $x$ and $y$.
Among all possible sets $S$, output one whose score is the minimum.
However, your output must satisfy the following constraints.
  • $1 \le S_i \le 10^9$
  • $S_i \neq S_j$ ( $1 \le i < j \le N$ )
It can be proved that there exists a set $S$ with the minimum score that satisfies the above constraints.

Input

$N$

$N$ is an integer between $2$ and $10$, inclusive.

Output

Output the set $S$ in the following format.

$S_1$ $S_2$ $\dots$ $S_N$
If there are multiple correct answers, any of them will be accepted.

Sample

Sample 1
Input
3
Output
2 6 3

For $S = \{2,6,3\}$, the following hold.

  • ${\rm lcm}(S_1,S_2) = {\rm lcm}(2,6) = 6$
  • ${\rm lcm}(S_1,S_3) = {\rm lcm}(2,3) = 6$
  • ${\rm lcm}(S_2,S_3) = {\rm lcm}(3,6) = 6$
In this case, the score of $S$ is $1$, which is the minimum achievable.
Other outputs such as 1500 300 500 are also accepted.

On the other hand, for $S = \{2,4,8\}$, the following hold.
  • ${\rm lcm}(S_1,S_2) = {\rm lcm}(2,4) = 4$
  • ${\rm lcm}(S_1,S_3) = {\rm lcm}(2,8) = 8$
  • ${\rm lcm}(S_2,S_3) = {\rm lcm}(4,8) = 8$
In this case, the score of $S$ is $2$, which is not the minimum achievable, so the output 2 4 8 is considered incorrect.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。