403879: GYM101350 J Lazy Physics Cat

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

J. Lazy Physics Cattime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Physics cat likes to draw shapes and figure out their area. He starts by drawing a circle. Then inside the circle, he draws the triangle X, Y, Z - where Y is the center point of the circle, and X and Z touch the circumference of the circle. Please note that points X and Y always have the same x-coordinate.

Given L (the distance between Points X and Y) and A (the angle XYZ in degrees); help physics cat find the shaded area between the right side of the triangle and the circumference of the circle. And when we say help, we mean do all the work for him.

Input

The first line of input is T – the number of test cases.

The first line of each test case is integers L and A (1 ≤ L ≤ 1000) (1 ≤ A ≤ 180).

Output

For each test case, output on a line the area of the shaded region rounded to 6 decimal places.

ExampleInput
3
1 90
2 180
10 30
Output
0.285398
6.283185
1.179939

加入题单

算法标签: