F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Iron Chain

Time 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
2 0 10 20 1 3 4
 

Sample Output
Case 1: The iron chain will reach the floor after 1.428 seconds. Case 2: The iron chain will reach the floor after 0.595 seconds.
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.001000(s) query 1, Server time : 2025-04-01 08:28:15, Gzip enabled