#Q166. 「一本通 5.3 例 2」数字游戏
「一本通 5.3 例 2」数字游戏
Description
Recently, a number game has become very popular in the Science and Technology Association. Someone has defined a type of non-decreasing number, where each digit from left to right must be less than or equal to the next digit, such as or . Now, everyone has decided to play a game: given a closed interval , determine how many non-decreasing numbers exist within this interval.
Input Format
There are multiple test cases. Each case contains only two numbers and , as described in the problem.
Output Format
For each test case, output the answer on a single line, i.e., the count of non-decreasing numbers in the interval .
Sample 1
1 9
1 19
9
18
Constraints and Notes
For all test cases, .