cswork / OA打开练习工作台

IBMOA #15

Count Power Products in Range

估计简单可在线判题

考点(AI 标注)位运算

Count the integers in the closed interval [low,high] that can be written as 3^x×5^y, where x,y are both non-negative; 1 is valid, and each value is counted only once.

输入格式

One line containing low high. On this site −2^63≤low≤high≤2^63−1.

输出格式

Output one integer, the answer.

样例 1

输入:

1 20

输出:

5

样例 2

输入:

2 2

输出:

0

样例 3

输入:

-10 1

输出:

1

样例说明

The examples give 5 (1, 3, 5, 9, 15), 0 and 1 respectively.