2014
01-04

How To Use The Car

One day , Teddy and WhereIsHeroFrom want to pay a visit to their friend yifenfei who are in another city.They own a car ,but the car is so small that it can only contains two people.But both Teddy and WhereIsHeroFrom can’t drive a car,so they needs a driver to help them.
Now give you the speed of Teddy and WhereIsHeroFrom , and the speed of the car ,you are asked to worked out the least time Teddy and WhereIsHeroFrom need to spend if they want to reach yifenfei’s home at the same time.You may suppose if one gets off the car ,the driver can turn around to carry the other one .

Each line will contain three integers A (0<A<=1000), B(0<B<=10000) and C(0<C<=10^9). A stands for the speed of Teddy and WhereIsHeroFrom ,B stands for the speed of the car,C stands for the distance between the two cities .Process to end of file.

Each line will contain three integers A (0<A<=1000), B(0<B<=10000) and C(0<C<=10^9). A stands for the speed of Teddy and WhereIsHeroFrom ,B stands for the speed of the car,C stands for the distance between the two cities .Process to end of file.

1 2 1

0.700

1. 样例输出和程序输出不吻合，修改一下样例输出吧。我用的是VC编译器，会提示我的i和j变量重复定义