e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Problems

How many sixs?

How many sixs?

How many times will be written the digit 6 if to write sequentially all the positive integers from a to b?

Input

Two positive integers a and b (1a, b109).

Output

The number of 6 in sequentially written integers from a to b.

Time limit 1 second
Memory limit 122.17 MiB
Input example #1
1 89
Output example #1
19
Source Житомирская ХХVIII обласная олимпиада по информатике