-->
当前位置:首页 > 题库

PROGRAMMING:Star Spiritual Rhino

Luz5年前 (2021-05-10)题库416
*Super Brain* is a famous scientific reality and talent show aiming to find people with exceptional brainpower.
In one of the challenges called *Star Spiritual Rhino*, at first, a virtual galaxy was given to the contestant. Here shows the picture:
![ Wechat pictures_ 20200607170439.png](~/84b95177-0ef9-4136-b492-564626bf21af.png)
Then, the two contestants will observe this virtual galaxy for a limited time, and deduce the pattern of the running track of every two planets' connection in their minds. In order to complete this task, contestants need to evaluate the distance between every two planets in each moment.
![ Wechat pictures_ 20200607170445.png](~/8abaf07c-0eef-4a48-a24d-88f45cb3bef1.png)
Now you are asked to write a program to help them tackle this problem. Given the radius of the two selected planets, and a period of time, please calculate the distance between the two planets at the moment after the period of time.
To simplify the problem, in this problem, we just consider that:
*The initial position of each plane is always located at $$x $- axis positive axle, and all of the planes always rotate counter clockwise
*Don't consider the effect of gravity on planet rotation, and assume that all planes make uniform circular motions in a fixed circular orbit
* The gravitational constant $$G=6.67$$ ×$$ 10^{-11}$$ $$N$$·$$m^2/kg^2$$.
* And the weight of all of the planets are equal, and all of them satisfy $$M=1.5$$ ×$$ 10^{10} kg$$. So that it's always maintained that $$GM=1$$.
### Input Specification:
There are multiple test cases. The first line of the input contains an integer $$T$$, indicating the number of test cases. For each test case:
Each line contains three integers $$R$$, $$r$$, $$t$$ (1 ≤ $$R$$, $$r$$ ≤ $$10^5$$, 0 ≤ $$t$$ ≤ $$10^9$$), indicating the radius of two given planets and the given period of time.
### Output Specification:
For each case, print a float number (keep 1 decimal places), indicating the distance between two selected planets after $$t$$ seconds.
### Sample Input:
```in
two
1 4 25
4 1 50
```
### Sample Output:
```out
five
three
```
### Hint:
The relevent formula of this problem:
1. Law of gravitation:
![ 1591684372(1).png](~/d58e91f9-a588-4f1e-ab1b-0011c629fc8a.png)
2. Uniform circular motion:
![ 1591684721(1).png](~/e7adb126-e6bb-4755-b88c-9ca451ec28d9.png)
3. Period of uniform circular motion:
![ 1591710619(1).png](~/fea455d5-021e-4b4f-9cbf-ff6b2b587dfd.png)







answer:If there is no answer, please comment