166. Counting Calories (Easier Version)

Codeforces
IDCF10269166
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
Over the quarantine season, you decide to watch your weight by limiting yourself to a certain amount of calories a day. In your house, you stocked up on a small variety of foods before the quarantine, and regardless of what time of the day it is, you must choose from these items: Steak: 500 Cal Apple: 100 Cal Bread: 50 Cal You will be given a number $n$, denoting the number of calories you have limited yourself to for the day. $n$ will be divisible by 50. Print the minimum amount of articles of food you must consume for the day in order to reach your caloric limit exactly. ## Input You will be given a number $n$, denoting the number of calories you have limited yourself to for the day.$n$ will be divisible by 50. ## Output Print the minimum amount of articles of food you must consume for the day in order to reach your caloric limit exactly. [samples]
**Definitions** Let $ n \in \mathbb{Z}^+ $ be the daily caloric limit, with $ 50 \mid n $. Let the food items be defined by their caloric values: - Steak: $ c_1 = 500 $ - Apple: $ c_2 = 100 $ - Bread: $ c_3 = 50 $ **Objective** Find the minimum number of food items $ m \in \mathbb{Z}^+ $ such that: $$ 500x + 100y + 50z = n, \quad x, y, z \in \mathbb{Z}_{\geq 0} $$ and $ m = x + y + z $ is minimized.
API Response (JSON)
{
  "problem": {
    "name": "166. Counting Calories (Easier Version)",
    "description": {
      "content": "Over the quarantine season, you decide to watch your weight by limiting yourself to a certain amount of calories a day. In your house, you stocked up on a small variety of foods before the quarantine,",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269166"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Over the quarantine season, you decide to watch your weight by limiting yourself to a certain amount of calories a day. In your house, you stocked up on a small variety of foods before the quarantine,...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ be the daily caloric limit, with $ 50 \\mid n $.  \nLet the food items be defined by their caloric values:  \n- Steak: $ c_1 = 500 $  \n- Apple: $ c_2 = 100 $ ...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments