Problem Description Compared to wildleopard's wealthiness, his brother mildleopard is rather poor. His house is narrow and he has only one light bulb in his house. Every night, he is wandering in his incommodious house, thinking of how to earn more money. One day, he found that the length of his shadow was changing from time to time while walking between the light bulb and the wall of his house. A sudden thought ran through his mind and he wanted to know the maximum length of his shadow.
Input
The first line of the input contains an integer T (T <= 100), indicating the number of cases.
Each test case contains three real numbers H, h and D in one line. H is the height of the light bulb while h is the height of mildleZ喎?http://www.Bkjia.com/kf/ware/vc/" target="_blank" class="keylink">vcGFyZC4gPGVtPkQ8L2VtPiBpcyBkaXN0YW5jZSBiZXR3ZWVuIHRoZSBsaWdodCBidWxiIGFuZCB0aGUgd2FsbC4gQWxsIG51bWJlcnMgYXJlIGluIHJhbmdlIGZyb20gMTA8c3VwPi0yPC9zdXA+IHRvIDEwPHN1cD4zPC9zdXA+LCBib3RoIGluY2x1c2l2ZSwgYW5kCjxlbT5IPC9lbT4gLSA8ZW0+aDwvZW0+ID49IDEwPHN1cD4tMjwvc3VwPi4gPC9wPgo8cD48c3Ryb25nPk91dHB1dDwvc3Ryb25nPjwvcD4KPHA+Rm9yIGVhY2ggdGVzdCBjYXNlLCBvdXRwdXQgdGhlIG1heGltdW0gbGVuZ3RoIG9mIG1pbGRsZW9wYXJk"s shadow in one line, accurate up to three decimal places..
Sample Input
3 2 1 0.5 2 0.5 3 4 3 4
Sample Output
1.000 0.750 4.000
我感覺這就是一道數學題:
#include