問題一覧 > 通常問題

No.3693 Divide Evenly

レベル : / AI推定難易度 : 109 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 1024 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 43
作問者 : yuki2006
お気に入りにしたユーザー ProblemId : 13196 / 自分の提出
問題文最終更新日: 2026-08-27 00:38:54
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
チーム機能テストコンテスト (順位表) の他の問題:

Problem Statement

$N$ participants are divided into $K$ teams. When they are divided so that the difference in size between any $2$ teams is at most $1$, find the number of members of each team.

Input

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

Output

Print the number of members of each team in descending order, separated by spaces, on $1$ line. Print a newline at the end.

Sample

Sample 1
Input
7 3
Output
3 2 2

$7$ people are divided into $3$ teams. With $3, 2, 2$, the differences are at most $1$.

Sample 2
Input
6 3
Output
2 2 2

If the division is exact, all teams have the same number of members.

Sample 3
Input
5 5
Output
1 1 1 1 1

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