#Q169. 「一本通 5.3 练习 2」不要 62
「一本通 5.3 练习 2」不要 62
Description
Original Source: HDU 2089
Hangzhou locals refer to those silly and sticky people as "62" (pronounced as laoer).
The Hangzhou Traffic Management Bureau often expands taxi license plates. Recently, there's good news: future license plates will no longer contain unlucky numbers. This aims to eliminate psychological barriers for some taxi drivers and passengers, thereby serving the public more safely.
Unlucky numbers are defined as all numbers that contain either the digit or the sequence . For example: , , and are all unlucky numbers. However, contains digits and but not the sequence , so it is not considered an unlucky number.
Your task is, for each given license plate number interval, determine how many new taxi license plates the bureau will actually issue in the future.
Input Format
The input consists of integer pairs . If an input pair consists of two zeros, the input terminates.
Output Format
For each integer pair, output the count of numbers that do not contain any unlucky digits, with each result on a separate line.
Sample 1
1 100
0 0
80
Constraints and Notes
For all data, .