023. Ping Pong Parachute

Codeforces
IDCF10269023
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
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 + 2 a d$ 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 A double representing the initial velocity of the rocket The predicted height of the rocket ## Input A double representing the initial velocity of the rocket ## Output The predicted height of the rocket [samples]
**Definitions** Let $ v_i \in \mathbb{R}^+ $ be the initial velocity of the rocket (in m/s). Let $ v_f = 0 $ be the final velocity at maximum height (in m/s). Let $ a = -9.8 \, \text{m/s}^2 $ be the acceleration due to gravity. Let $ d \in \mathbb{R}^+ $ be the maximum height reached by the rocket (in meters). **Constraints** $ v_i \geq 0 $ **Objective** Compute $ d $ using the kinematic equation: $$ v_f^2 = v_i^2 + 2 a d $$ Solving for $ d $: $$ d = \frac{v_i^2}{-2a} $$
API Response (JSON)
{
  "problem": {
    "name": "023. Ping Pong Parachute",
    "description": {
      "content": "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",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269023"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "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...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ v_i \\in \\mathbb{R}^+ $ be the initial velocity of the rocket (in m/s).  \nLet $ v_f = 0 $ be the final velocity at maximum height (in m/s).  \nLet $ a = -9.8 \\, \\text{m/s}^2 $ be...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments