問題一覧 > 通常問題

No.1658 Product / Sum

レベル : / AI推定難易度 : 800 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / スペシャルジャッジ問題 (複数の解が存在する可能性があります)
タグ : (AC するまで非表示) / 解いたユーザー数 184
作問者 : 👑 箱星 / テスター : ygussany sak
お気に入りにしたユーザー ProblemId : 6768 / 自分の提出
問題文最終更新日: 2022-04-26 00:07:39
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 311 (順位表) の他の問題:

Problem Statement

Find $1$ tuple of $N$ positive integers $A_1,A_2,\ldots,A_N$ satisfying $\displaystyle\frac{A_1\times A_2\times\cdots\times A_N}{A_1+A_2+\cdots+A_N}=K$.

It can be proved that an answer always exists under the constraints of this problem.

Constraints

  • $2\le N\le 10^5$
  • $1\le K\le 10^5$
  • All inputs are integers

Input

$N$ $K$

Output

Output $N$ positive integers $A_1,A_2,\ldots,A_N$ satisfying the condition, separated by single-byte spaces. If there are multiple answers, you may output any of them.

Sample

Sample 1
Input
2 5
Output
6 30

We have $\displaystyle\frac{A_1\times A_2}{A_1+A_2}=\frac{6\times 30}{6+30}=5$.

Sample 2
Input
4 2
Output
2 2 2 2

Sample 3
Input
9 900
Output
3 1 4 1 5 9 2 6 5

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。