AtCoder Beginner Contest 090
B
Palindromic Numbers
AtCoder
⌀ 8
原题
← AC →
翻译中…

Problem Statement

翻译中…

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

翻译中…

Output

翻译中…

Print the number of palindromic numbers among the integers between $A$ and $B$ (inclusive).

翻译中…

样例

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
题目信息
题号
abc090_b
时间限制
2 s
内存限制
256 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。