AtCoder Regular Contest 115
翻译中…
Problem Statement
翻译中…
Given is an integer $N$. Among the sequences of $N$ positive integers $A_1, A_2, \ldots, A_N$ satisfying the following condition, print one that minimizes the maximum value in the sequence.
翻译中…
- If
$i$divides$j$,$A_i \neq A_j$$(1 \leq i < j \leq N)$.
翻译中…
Constraints
翻译中…
$1 \leq N \leq 10^5$
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
N
翻译中…
Output
翻译中…
Print a line containing the elements of your sequence, with spaces in between.
翻译中…
If there are multiple valid solutions, any of them will be accepted.
翻译中…
A_1 A_2 \ldots A_N
翻译中…
样例
Input #1
4
Output #1
1 2 2 3
This solution satisfies all of the following conditions:
- $A_1 \neq A_2$
- $A_1 \neq A_3$
- $A_1 \neq A_4$
- $A_2 \neq A_4$
Additionally, there is no sequence satisfying these conditions where the maximum value in the sequence is $2$ or less, so this is a valid solution.
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。