Problems
Degrees of two
Degrees of two
It's not a secret that the number 2n
for any nonnegative integer n in binary notation has a very simple form - one in the high bit and then follow n zeros. In the decimal system these numbers are not so unvaried, but even among them there are those that start with one.
Calculate how many such numbers in a given range.
Input
Two integers n1
and n2
(0 ≤ n1
< n2
≤ 109
), separated with a space.
Output
Print, how many numbers are power of two, belong to the range [2n1
; 2n2
] and in decimal notation their first digit is one.
Input example #1
0 10
Output example #1
4