![]() |
||||||||||
|
||||||||||
Iron ChainTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 415 Accepted Submission(s): 121 Problem Description In physics class, the teacher shows us an interesting physics experiment. He hangs an iron chain on a fixed point on the wall. (Look at the right picture for more details). If the lengths of the iron chains on the left side and right side are different, the gravity forces the iron chain to drop to the floor and hits the sensor. Then the computer shows the F-t functional image on the screen. The teacher wants to teach you momentum and its conservation: But you are not interested in this at all. The thing you want to know is how long it takes for the iron chain to drop to the floor. You can assume that the iron chain is well-mixed, and you can ignore the friction between the iron chain and the fixed point on the wall. The friction between the chain and the air needn’t be taken into account either. The fixed point is a particle whose radius is 0. And the acceleration of gravity, or so-called g, is 9.80665m/s2 in this problem. Input The input consists of several test cases. There is a single number above all, the number of cases. There are no more than 20 cases. Each case contains three integer numbers a, b, h. Look at the picture above for their meaning. 1<=a+b<=5000,a+b<=h<=10000. Output For each case, if the chain can reach the floor, print” The iron chain will reach the floor after t seconds.”, otherwise, print” The iron chain will not reach the floor at all!” instead. And the answer should be rounded to three digits to the right of the decimal point. Use the format in the sample. Sample Input
Sample Output
Source | ||||||||||
|