|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||128 MB||1||1||1||100.000%|
A cuboid is a 3 dimensional shape in which each of the six faces is a rectangle. Sally Jones, a primary school teacher, is giving her pupils some practice at calculating the volume of a cuboid. I am sure you remember that volume = length x width x height.
Sally has given her pupils a table of lengths, widths, heights and volumes. Each row on the table has one of the 4 values missing; the pupils have to work out the missing value and write it in the table such that the values on each line represent the length, width, height and volume of one cuboid.
Input is a series of lines, each containing 4 integers, l, w, h and v representing the length, width height and volume of a cuboid in that order. The integers are separated by a single space. 0 < l, w, h <100, 0 < v < 100,000. In each row, one of the values has been replaced by a zero. The final row contains 0 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 length, width, height or volume as appropriate. The new value is always an integer.
2 1 0 6 6 5 4 0 0 8 5 80 9 0 8 576 0 0 0 0
2 1 3 6 6 5 4 120 2 8 5 80 9 8 8 576