Time Limit: Java: 2000 ms / Others: 2000 ms

Memory Limit: Java: 65536 KB / Others: 65536 KB

Dick is 12 years old. When we say this, we mean that it is at least twelveand not yet thirteen years since Dick was born.

Dick and Jane have three pets: Spot the dog, Puff the Cat, and Yertlethe Turtle. Spot was s years old when Puff was born; Puff was p yearsold when Yertle was born; Spot was y years old when Yertle was born.The sum of Spot's age, Puff's age, and Yertle's age equals the sumof Dick's age (d) and Jane's age (j). How old are Spot, Puff, and Yertle?

Each input line contains four non-negative integers: s, p, y, j.For each input line, print a line containing three integers: Spot's age, Puff's age, and Yertle's age. Ages are given in years, as described in the first paragraph.

提交代码