33OJ
登录 注册
    传统题 1000ms 256MiB

葡萄 / Grapes

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Problem Statement

There are NN people numbered from 11 to NN.

There are MM grapes. They will be distributed to the NN people as follows.

  • Give one grape each to persons 1,2,…,N1,2,\dots,N in this order. If the grapes run out midway, the distribution ends at that point.
  • If there are still grapes remaining after giving to person NN, go back to person 11 and distribute in order again. Repeat this until the grapes run out.

Find how many grapes each person receives.

Constraints

  • 1≤N≤1001 \leq N \leq 100
  • 1≤M≤100001 \leq M \leq 10000
  • All input values are integers.

Input

The input is given from Standard Input in the following format:

  • NN MM

Output

Output NN lines. The ii-th line should contain the number of grapes person ii receives.

3 5
2
2
1

The five grapes are given one at a time to persons 1,2,3,1,21,2,3,1,2 in this order.

4 1
1
0
0
0

There may be people who receive no grape.

12 3456
288
288
288
288
288
288
288
288
288
288
288
288

Everyone may receive the same number of grapes.

ABC478 赛后模拟赛 ✅️

未参加
状态
已结束
规则
IOI
题目
7
开始于
2026-10-10 21:40
结束于
2026-10-24 21:40
持续时间
336 小时
主持人
参赛人数
59