atcoder#ARC115C. [ARC115C] ℕ Coloring
[ARC115C] ℕ Coloring
Score : points
Problem Statement
Given is an integer . Among the sequences of positive integers satisfying the following condition, print one that minimizes the maximum value in the sequence.
- If divides , .
Constraints
Input
Input is given from Standard Input in the following format:
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.
4
1 2 2 3
This solution satisfies all of the following conditions:
Additionally, there is no sequence satisfying these conditions where the maximum value in the sequence is or less, so this is a valid solution.