Robot Balance

AtCoder
IDabc431_a
Time2000ms
Memory256MB
Difficulty
Takahashi can combine a head part and a body part to create a robot. A robot falls over if the weight of the head part is greater than the weight of the body part. Currently, he has one head part and one body part. The weight of the head part is $H$ grams, and the weight of the body part is $B$ grams. He wants to make the body part heavier so that the robot does not fall over. Find how many more grams the body part needs to be made heavier so that his robot does not fall over. ## Constraints * $1\le H\le100$ * $1\le B\le100$ * All input values are integers. ## Input The input is given from Standard Input in the following format: $H$ $B$ [samples]
Samples
Input #1
43 1
Output #1
42

By making the body part $42$ grams heavier, Takahashi can make the weights of the head part and body part equal.
When the amount by which the body part is made heavier is less than $42$ grams, his robot will fall over, so print `42`.
Input #2
4 31
Output #2
0

Even if he creates the robot as is, the robot will not fall over, so print `0`.
Input #3
1 1
Output #3
0
API Response (JSON)
{
  "problem": {
    "name": "Robot Balance",
    "description": {
      "content": "Takahashi can combine a head part and a body part to create a robot. A robot falls over if the weight of the head part is greater than the weight of the body part. Currently, he has one head part and ",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc431_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Takahashi can combine a head part and a body part to create a robot. A robot falls over if the weight of the head part is greater than the weight of the body part.\nCurrently, he has one head part and ...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments