编程介的小学生
2017-11-05 16:24How To Use The Car
10Problem Description
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 .
Input
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.
Output
For each case, output the least needed time in one line,accurate to three decimal places.
Sample Input
1 2 1
Sample Output
0.700
- 点赞
- 回答
- 收藏
- 复制链接分享
0条回答
为你推荐
- 为什么我的Stringer接口方法没有被调用? 使用fmt.Println时
- it技术
- 互联网问答
- IT行业问题
- 计算机技术
- 编程语言问答
- 5个回答
- 如何在Go中对结构的特定方法执行单元测试
- unit-testing
- 2个回答
- Laravel有许多对多人的雄辩
- laravel
- php
- 1个回答
- PHP类到C#类?
- php
- c#
- 6个回答
- Facebook SDK V4
- php
- 1个回答