zoj 3629 Treasure Hunt IV(找规律)

2015年10月27日 0 作者 CrazyKK

Alice is exploring the wonderland, suddenly she fell into a hole, when she woke up, she found there are b – a + 1 treasures labled a fromb in front of her.
Alice was very excited but unfortunately not all of the treasures are real, some are fake.
Now we know a treasure labled n is real if and only if [n/1] + [n/2] + … + [n/k] + … is even.
Now given 2 integers a and b, your job is to calculate how many real treasures are there.


The input contains multiple cases, each case contains two integers a and b (0 <= a <= b <= 263-1) seperated by a single space. Proceed to the end of file.


Output the total number of real treasure.

Sample Input

Sample Output

View Code