#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 44 or the sequence 6262. For example: 6231562315, 7341873418, and 8891488914 are all unlucky numbers. However, 6115261152 contains digits 66 and 22 but not the sequence 6262, 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 n,mn, m. 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, 0<nm<1070 < n \le m < 10^7.