No.3159 Just Answer 10 Integers!
問題文最終更新日: 2025-05-23 19:01:29
English (AI translation)
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$.
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$ )
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$
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$
2 4 8 is considered incorrect.提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
butsurizuki
jastaway