eolymp
bolt
Try our new interface for solving problems
Problems

Count the integers of the form 2^x * 3^y

Count the integers of the form 2^x * 3^y

Find the count of integers from the range $[a, b]$ that can be represented as $2^x \cdot 3^y~(x \ge 0, y \ge 0)$. \InputFile Consists of no more than $10^6$ lines. Each line contains two integers $a$ and $b~(0 \le a \le b \le 10^{18})$ that represents one query. \OutputFile For each query print in a separate line the number of integers from the range $[a, b]$ inclusively that can be represented as $2^x \cdot 3^y$.
Time limit 1 second
Memory limit 128 MiB
Input example #1
1 10
100 200
Output example #1
7
5