|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||128 MB||127||117||111||91.736%|
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.
2 0 6 6 5 0 0 8 80 9 0 45 0 0 0
2 3 6 6 5 30 10 8 80 9 5 45