Type: RemoteJudge 1000ms 64MiB

练13.4 糖果游戏

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

说明

某幼儿园里,有55个小朋友编号为1122334455,他们按自己的编号顺序围坐在一张圆桌旁。他们身上都有若干个糖果(键盘输入),现在他们做一个分糖果游戏。从11号小朋友开始,将自己的糖果均分三份(如果有多余的糖果,则立即吃掉),自己留一份,其余两份分给他的相邻的两个小朋友。接着22号、33号、44号、55号小朋友同样这么做。问一轮后,每个小朋友手上分别有多少糖果。

输入格式

55个小朋友的糖果数。

输出格式

游戏后55个小朋友的糖果数。(按55位宽度输出)

样例

8 9 10 11 12
   11    7    9   11    6

2024庆元旦积分赛

Not Attended
Status
Done
Rule
IOI
Problem
10
Start at
2023-12-31 9:00
End at
2024-1-4 22:00
Duration
109 hour(s)
Host
Partic.
91