Harry is going to start his school at Hogwarts this year. In order to reach Hogwarts, he needs to catch the “Hogwarts Express” and that too from platform number nine and three quarter of the King’s Cross railway station. But, he doesn’t know how far he has to go to reach that peculiar platform.
Assume, King’s Cross is a railway station in a half-circular shape. Harry is standing on the midpoint of diameter , which is . There is a chord . The bisector of the angle intersects King’s Cross at . The midpoint of is . intersects the perpendicular bisector of the chord at , exactly where the platform nine and three quarter is located.
Harry needs to reach from . He only knows the radius of King’s Cross railway station , and the value of the angle . Help Harry calculate the length of .
Input starts with an integer (), denotes the number of test cases.
Then T lines follow. Each line contains two integers (), denoting the radius of King’s Cross and (), denoting the value of angle , in degrees.
For each test case, print the length of . Errors less than will be ignored.
Input | Output |
---|---|
2 10 45 50 30 | 5.857864 22.400924 |