You are on page 1of 1

Problem 7: Infiltration!!

(150 points)

The entry to the humans’ control center on Pandora is via a large circular
hall. The huge structure is supported by a cluster of circular columns. The
Na’vi want to infiltrate the control center. Luckily, many of the guards have
rebelled against the colonel, supporting the cause of the Na’vi. Only one guard
is securing the hall, and he is wise enough to choose the best position, the
centre of the hall. This, however, provides ample opportunity for the Na’vi to
enter the hall without being noticed. Given that the radii of the hall and each
column are R and r respectively, and that the columns are centred at points
with integral co-ordinates, with the guard’s position to be the orgin, where there
is no column; what length of the hall’s boundary wall is not visible to the guard.

Input Format:

The first line of the input contains the number of test cases (n) to follow.
The next n lines contain the value of R(integer) and r(floating point number)
seperated by a space.

Output Format:

n lines of output containing the length of the boundary wall not visible, correct
to three decimal places.

Sample Input:
1 0.1
2 0.1

Sample Output: