Лимит времени 1000/1000/1000/1000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Problem description
A positive integer N is said to be a "round number" if the binary representation of N
has as many or more zeroes as it has ones. For example, the integer 9, when written in binary form, is
1001. 1001 has two zeroes and two ones; thus, 9 is a round number. The integer 26 is 11010 in binary;
since it has two zeroes and three ones, it is not a round number.
Write a program that tells how many round numbers appear in the inclusive range given by the input.
Input
There are two integers A and B (0 ≤ A ≤ B ≤ 1000000).
Output
Number of round numbers in given range.
Example
Для отправки решений необходимо выполнить вход.
|