Sandglass2

AtCoder
IDabc072_a
Time2000ms
Memory256MB
Difficulty
We have a sandglass that runs for $X$ seconds. The sand drops from the upper bulb at a rate of $1$ gram per second. That is, the upper bulb initially contains $X$ grams of sand. How many grams of sand will the upper bulb contains after $t$ seconds? ## Constraints * $1≤X≤10^9$ * $1≤t≤10^9$ * $X$ and $t$ are integers. ## Input The input is given from Standard Input in the following format: $X$ $t$ [samples]
Samples
Input #1
100 17
Output #1
83

$17$ out of the initial $100$ grams of sand will be consumed, resulting in $83$ grams.
Input #2
48 58
Output #2
0

All $48$ grams of sand will be gone, resulting in $0$ grams.
Input #3
1000000000 1000000000
Output #3
0
API Response (JSON)
{
  "problem": {
    "name": "Sandglass2",
    "description": {
      "content": "We have a sandglass that runs for $X$ seconds. The sand drops from the upper bulb at a rate of $1$ gram per second. That is, the upper bulb initially contains $X$ grams of sand. How many grams of sand",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc072_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "We have a sandglass that runs for $X$ seconds. The sand drops from the upper bulb at a rate of $1$ gram per second. That is, the upper bulb initially contains $X$ grams of sand.\nHow many grams of sand...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments