問題一覧 > 通常問題

No.796 well known

レベル : / AI推定難易度 : 151 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / スペシャルジャッジ問題 (複数の解が存在する可能性があります)
タグ : (AC するまで非表示) / 解いたユーザー数 459
作問者 : asdf1 / テスター : MATSUMAT
お気に入りにしたユーザー ProblemId : 2489 / 自分の提出
問題文最終更新日: 2019-03-15 15:59:58
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
yukicoder contest 207 (順位表) の他の問題:

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もしくは右上の雲マークをクリックしてアカウントを作成してください。