#Q17. 「一本通 1.2 练习 3」灯泡

「一本通 1.2 练习 3」灯泡

Description

Original Source: ZOJ 3203

Compared to wildleopard's home, his younger brother mildleopard is relatively poor. His house is narrow, and there is only one light bulb in his room. Every night, he wanders around his cramped house, pondering how to earn more money. One day, he noticed that the length of his shadow changes as he walks between the light bulb and the wall. A sudden idea struck him—he wanted to determine the maximum length his shadow could reach.

bulb.jpg

Input Format

The first line of the input file contains an integer TT, representing the number of test cases.

For each test case, there is only one line containing three real numbers HH, hh, and DD. Here, HH denotes the height of the light bulb, hh represents mildleopard's height, and DD is the horizontal distance between the light bulb and the wall.

Output Format

The output file should consist of TT lines, one for each test case, indicating the maximum length of the shadow, rounded to three decimal places.

Sample 1

3
2 1 0.5
2 0.5 3
4 3 4

1.000
0.750
4.000

Constraints & Hints

T100T \leq 100, 102H,h,D10310^{-2} \leq H, h, D \leq 10^3, 102Hh10^{-2} \leq H - h.