Pro.ID22708 TitleFIFA World cup 2006 Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22708 AC0 Submit0 Ratio- 时间&空间限制描述Football is one of the most popular words in 2006. Bob cannot go to Germany for the FIFA world cup 2006 and can only watch the TV instead. As the following figure, height of the TV is L, and TV is placed at H above Bob's eyes, shown in Figure 1. Bob want to maximize the angle a. You need to tell Bob x, the distance between the TV and Bob's eyes, when the angle a is maximum. Attention please, x ≥ D (or TV will do harm to Bob). Figure 1 Bob and TV 输入The first line of the input is a positive integer T. T is the number of the test cases followed. Each test case contains three integer L, H, D ( -1000 < H < 1000, 0 < L, D < 1000 ). There may be one or several spaces before or after the integer. 输出Description Football is one of the most popular words in 2006. Bob cannot go to Germany for the FIFA world cup 2006 and can only watch the TV instead. As the following figure, height of the TV is L, and TV is placed at H above Bob's eyes, shown in Figure 1. Bob want to maximize the angle a. You need to tell Bob x, the distance between the TV and Bob's eyes, when the angle a is maximum. Attention please, x ≥ D (or TV will do harm to Bob). Figure 1 Bob and TV Input The first line of the input is a positive integer T. T is the number of the test cases followed. Each test case contains three integer L, H, D ( -1000 < H < 1000, 0 < L, D < 1000 ). There may be one or several spaces before or after the integer. Output The output of the program should consist of one line of output for each test case. The output of each test case only contains x rounded to two decimal places past the decimal point, and always showing the two decimal places past the decimal point. No any redundant spaces is needed. Sample Input 3 Sample Output 10.00 Source 样例输入3 样例输出10.00 作者 |