H. Steaks

Codeforces
IDCF10226H
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
Motasem wants to cook n steaks (the steak consists of two faces) for his friends, and each face of the steak needs to be cooked for 5 minutes. Unfortunately, his pans can only fit 2 steaks at a time, and he only has k pans. If Motasem is cooking his steaks optimally, what is the minimum number of minutes he needs to cook all n steaks? A single line containing two space separated integers $n, k$ ($1 <= n, k <= 10^9$) represent the number of steaks and pans respectively. A single integer represents the minimum time needed to cook all steaks ## Input A single line containing two space separated integers $n, k$ ($1 <= n, k <= 10^9$) represent the number of steaks and pans respectively. ## Output A single integer represents the minimum time needed to cook all steaks [samples]
**Definitions** Let $ V \in \mathbb{Z} $ be the number of vertices of a regular polygon, with $ 3 \leq V \leq 359 $. Let $ S \in \mathbb{R} $ be the side length of the polygon, with $ 1 \leq S \leq 10^9 $. Let $ R $ be the radius of the circumscribed circle. **Constraints** 1. $ 3 \leq V \leq 359 $ 2. $ 1 \leq S \leq 10^9 $ **Objective** Compute the area $ A $ of the circumscribed circle: $$ A = \pi R^2, \quad \text{where} \quad R = \frac{S}{2 \sin\left(\frac{\pi}{V}\right)} $$ Thus, $$ A = \pi \left( \frac{S}{2 \sin\left(\frac{\pi}{V}\right)} \right)^2 $$
API Response (JSON)
{
  "problem": {
    "name": "H. Steaks",
    "description": {
      "content": "Motasem wants to cook n steaks (the steak consists of two faces) for his friends, and each face of the steak needs to be cooked for 5 minutes. Unfortunately, his pans can only fit 2 steaks at a time, ",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10226H"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Motasem wants to cook n steaks (the steak consists of two faces) for his friends, and each face of the steak needs to be cooked for 5 minutes. Unfortunately, his pans can only fit 2 steaks at a time, ...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ V \\in \\mathbb{Z} $ be the number of vertices of a regular polygon, with $ 3 \\leq V \\leq 359 $.  \nLet $ S \\in \\mathbb{R} $ be the side length of the polygon, with $ 1 \\leq S \\le...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments