当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6812:Kindergarten Physics

Special Judge 特殊评判
题目描述
Zhang3 a participant of IPhO (Immortal Physics Olympiad). The $0^\mathrm{th}$ problem in the contest is as follows.

There are two balls that weigh $a$ kg and $b$ kg respectively. They can be regarded as particles in this problem, as they are small enough. At the very beginning (i.e. $t = 0$), the distance between two balls is $d$ km, and both of them are not moving.

Assuming that only gravitation works in this system (no other objects or other forces considered). The two balls has started moving since $t = 0$. Your task is to calculate the distance between them when $t = t_0$ (s).

Help Zhang3 solve the problem!



The following information might help when solving the problem.

- Universal gravitation formula: $F = G \cdot m_1 \cdot m_2 / r ^ 2$

- Gravitational constant: $G = 6.67430 \times 10^{-11} \; \mathrm{m}^3 / (\mathrm{kg} \cdot \mathrm{s}^2)$
输入解释
The first line of the input gives the number of test cases $T \; (1 \le T \le 100)$. $T$ test cases follow.

For each test case, the only line contains four integers $a, b, d, t_0 \; (1 \le a, b, d, t_0 \le 100)$, representing the mass of the two balls, the initial distance between them, and how much time the balls move.

It is guaranteed that two balls will not collide within $(t_0 + 1)$ seconds.
输出解释
For each test case, print a line with a real number $x$, representing that the distance is $x$ km.

Your answers should have absolute or relative errors of at most $10^{-6}$.
输入样例
3
1 2 3 4
7 73 7 68
100 100 1 100
输出样例
2.99999999999999999982
6.99999999999999974807
0.99999999999993325700
来自杭电HDUOJ的附加信息
Recommend liuyiding

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6812

最后修改于 2020-10-25T23:34:36+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 524288/524288K(Java/Others)