407052: GYM102697 023 Ping Pong Parachute

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

023. Ping Pong Parachutetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

You are currently working on Ping Pong Parachute for Science Olympiad and you want to test how high your rocket is going. The only problem is that your dog ate your altimeter, so now you can no longer use it to measure the rocket's height. Luckily you happen to have a PhD in physics and you can just calculate how high the rocket will go. Not only do you have a PhD, but you also have a speedometer, so you can see the speed of the rocket when it takes off(Initial velocity). The equation $$$V_f^2 = V_i^2 + 2ad$$$ to represent the height of the rocket.

$$$V_i$$$ = initial velocity

$$$V_f$$$ = speed of the rocket at its highest point (Hint: Its not moving)

a = acceleration due to gravity (-9.8 $$$m/s^2$$$)

d = height of the rocket

Input

A double representing the initial velocity of the rocket

Output

The predicted height of the rocket

ExampleInput
7.78
Output
3.0881836734693877

加入题单

算法标签: