Dabbu is back from Cox’s Bazar with an obsession with Coconut. Nowadays he is so obsessed with coconut that he has bought a coconut tree. Because He has a plan to eat more coconut water as it is very good for health and it revives the inner beauty of the skin. He also has a plan to start a business with coconut. In this situation, all of a sudden, his coconut tree was broken by the storm one day. At first, Dabbu became very sad. Seeing him sad, his mother, who is a competitive programmer, suggested a solution. She told Dabbu that if Dabbu can find the length of the broken part, she will give him some money as a reward.
Now, Dabbu is very eager to find the length of the broken part. But he has limited information to retrieve the length. Help Dabbu solve this problem. Because if you help him, he will get the money from his mother and will start a coconut business.
The coconut tree has broken in a way that from the ground point of the tree, it has broken on point and the peak of the tree has fallen on the ground on point creating an angle . The tree was initially standing perpendicular to the ground.
You will be given the length from point (the peak of the tree that fell on the ground) to point (the root of the tree) and the angle created on the broken part of the tree. Now help Dabbu become an entrepreneur!
The first line of the input contains an integer (), the number of test cases. Then, for each test case, there will be two real numbers (), a ( the distance from to and the angle respectively.
In the output, print the length of the tree. Errors less than will be ignored.
1 10 30
Login to submit
This problem has asked to calculate the lengths of two edges of a triangle, given the length of one ...