Logo
(追記) (追記ここまで)

4426번 - Dick and Jane 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB74211946.341%

문제

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.

제한

예제 입력 1

5 5 10 9
5 5 10 10
5 5 11 10

예제 출력 1

12 7 2
13 7 2
13 7 2

힌트

출처

Contest > Waterloo's local Programming Contests > 6 June, 1998 B번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /