Box N Ball

4

4 votes
Problem

Bozo is shifting his house. He has some balls and boxes which he has to shift. He now wonders how large a ball he can fit in a given box. Given the dimensions of a box, help Bozo determine the radius of the largest ball that he can fit in the box. Assume that an inflated ball will be spherical.

Input:-

The first line of the input will be T, the number of test cases. Next follows T lines each containing three space separated integers (L, B, H) which are the length, breadth and height of the box respectively.

Output:-

Print T lines each consisting of the radius(correct to 1 decimal place) of the largest ball that Bozo can fit in the box of dimensions corresponding to each test case.

Constraints:

1 <= T <= 10^5
1 <= L, B, H <= 10^18

Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?