No.796 well known
Problem Statement
You are given an integer $N$. Construct one sequence of $N$ positive integers that satisfies the following conditions. It can be proved that a sequence satisfying the conditions always exists.
- The remainder when the sum of all elements of the sequence is divided by $3$ is $1$.
- The product of all elements of the sequence is a multiple of $3$.
- The sum of all elements of the sequence is at most $312456$.
Input
$N$
The integer $N$ is given.
$2≦N≦10^5$
Output
Output one sequence that satisfies the conditions in the problem statement. Output a space between each pair of numbers. Print a newline at the end.
Sample
Sample 1
Input
3
Output
12344 12632 2142
The remainder when $12344$ $+$ $12632$ $+$ $2142$ is divided by $3$ is $1$.
$12344$ $×$ $12632$ $×$ $2142$ equals $334000791936$, and $334000791936$ is a multiple of $3$.
$12344$ $+$ $12632$ $+$ $2142$ is at most $312456$.
From the above three points, this sequence satisfies the conditions and is accepted as a solution.
Sample 2
Input
4
Output
4086 3264 1123 2478
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
asdf1
MATSUMAT