1138. Dick and Jane

单点时限: 2.0 sec

内存限制: 256 MB

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

输入格式

Dick and Jane have three pets: Spot the dog, Puff the Cat, and Yertle the Turtle. Spot was s years old when Puff was born; Puff was p years old 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 sum of 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.

样例

Input
5 5 10 9
5 5 10 10
5 5 11 10
Output
12 7 2
13 7 2
13 7 2

21 人解决,32 人已尝试。

22 份提交通过,共有 57 份提交。

5.0 EMB 奖励。

创建: 17 年前.

修改: 6 年,8 月前.

最后提交: 9 月,3 周前.

来源: partychen

题目标签