
countZeros(I)
Given two integers a and b, we write the numbers between a and b, inclusive in a list. Your task is to calculate the number of occurrences of the zeros
Example
- For
a = 10, b = 11
, the output should becountZeroDigit(A, B) = 1
- For
a = 100, b = 110
, the list will be[100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110]
so the output should becountZeroDigit(a, b) = 12
Input/Output
-
[execution time limit] 1 seconds
-
[input] integer a, b
a, b is a positive integer.
Guaranteed constraints:
[output] integer1 ≤ a <= b <= 10^7
.
The number of zero after write down all the numbers in range[a, b]
Post Comment