#Lutece0176. Professor Yang's Farm
Professor Yang's Farm
Migrated from Lutece 176 Professor Yang's Farm
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
Everyone has heard of the reputation of Professor Yang in the dieting area. All right, he and only he can make the delicious dishes which are in line with the harsh appetite of the Big Devil Fat Mao
. However, few people know that the key of Professor Yang's dishes is his condiment.
The condiments Professor Yang uses when he cooks come from Professor Yang's private farm. His farm is a regular polygon with edges whose values of length are meters. Now he needs fences to isolate the farm. However, to minimize the bad effects of fences on the plants in the farm, the fences must be placed at least one meter from the edge of the farm.
Though Proessor Yang is good at cooking, his math is fairly terrible. Can you help him calculate the minumum length of the fence?
Input
The first line of the inputs is (no more than ), which stands for the number of test cases you need to solve.Values for each test case are integers and will be listed in a line in such order : , , and .
Output
The result should be printed accurately rounded to two decimals.
Samples
2
4 4
6 6
22.28
42.28
Note
In order not to see many Wrong Answer
s because of precision problem, we recommend you to use Pi = acos(-1.0)
to set the value of .
Resources
allenlowesy & zhymaoiing