#P72. 练13.4 糖果游戏
练13.4 糖果游戏
Description
In a kindergarten, there are 5 children numbered 1, 2, 3, 4, and 5, sitting around a circular table in order of their numbers. Each child has a certain number of candies (input via keyboard). They play a candy distribution game. Starting with child 1, each child divides their candies into three equal parts (if there are extra candies, they eat them immediately), keeps one part, and gives the other two parts to their adjacent children. This process is repeated for children 2, 3, 4, and 5. Determine how many candies each child has after one round.
Input Format
Input consists of the number of candies each of the 5 children has.
Output Format
Output the number of candies each child has after the game, each number occupying 5 characters in width.
Sample
8 9 10 11 12
11 7 9 11 6