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

9950번 - Rectangles 다국어

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

문제

My young son is struggling with his maths homework, can you help him please? He is working on the area of a rectangle – you know, area = length x width. His teacher has given him a table of lengths, widths and areas. Each row on the table has one of the 3 values missing; my son has to work out the missing value and write it in the table such that the values on each line represent the length, width and area of one rectangle.

입력

Input is a series of lines, each containing 3 integers, l, w, and a ( 0 ≤ l w ≤100, 0 ≤ a ≤ 10,000) representing the length, width and area of a rectangle in that order. The integers are separated by a single space. In each row, only one of the values has been replaced by a zero. The final row contains 0 0 0 and should not be processed.

출력

Output is the same series of lines but with the zero in each line replaced by the correct value for the length, width or area as appropriate. The new value is always an integer.

제한

예제 입력 1

2 0 6
6 5 0
0 8 80
9 0 45
0 0 0

예제 출력 1

2 3 6
6 5 30
10 8 80
9 5 45

힌트

출처

ICPC > Regionals > South Pacific > South Pacific Region > New Zealand Programming Contest > NZPC 2007 D번

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

출처

대학교 대회

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

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