Here, is the center of the circle and is a tangent which intersects with the circle at the point . Moreover, the tangent intersects with the rays and .
You are given the radius of the circle , and the angle of the circular sector . You have to minimize the area of the shaded region by choosing the point optimally. Note that the point must need to be inside the angle and obviously on the circumference of the circle.
The first line of the input contains a single integer denoting the number of test cases. The description of test cases follows.
The first and only line of each test case contains two space-separated integers and — the radius of the circle and the angle of the circular sector in degrees respectively.
For each test case, output the minimum area of the shaded region that can be achieved by choosing the point optimally.
Your answer will be considered correct if its relative or absolute error doesn't exceed .
3 3 10 45 45 96 69
0.0019998083 43.5668233656 784.6720511715
Login to submit