Palindromic Numbers

AtCoder
IDabc090_b
Time2000ms
Memory256MB
Difficulty
Find the number of _palindromic numbers_ among the integers between $A$ and $B$ (inclusive). Here, a palindromic number is a positive integer whose string representation in base $10$ (without leading zeros) reads the same forward and backward. ## Constraints * $10000 \leq A \leq B \leq 99999$ * All input values are integers. ## Input Input is given from Standard Input in the following format: $A$ $B$ [samples]
Samples
Input #1
11009 11332
Output #1
4

There are four integers that satisfy the conditions: $11011$, $11111$, $11211$ and $11311$.
Input #2
31415 92653
Output #2
612
API Response (JSON)
{
  "problem": {
    "name": "Palindromic Numbers",
    "description": {
      "content": "Find the number of _palindromic numbers_ among the integers between $A$ and $B$ (inclusive). Here, a palindromic number is a positive integer whose string representation in base $10$ (without leading ",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc090_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Find the number of _palindromic numbers_ among the integers between $A$ and $B$ (inclusive). Here, a palindromic number is a positive integer whose string representation in base $10$ (without leading ...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments