The problem statement is simple, given A and B, find the sum of maximum odd divisor of the numbers between A and B (inclusive).
INPUT:
There are several test cases per file. Each file begins with T, number of test cases and the next T lines contain two values A and B.
CONSTRAINTS:
1≤T≤105
1≤A≤B≤1018
For the 1st file, T≤100,B≤105.
For the 2nd file, T≤105,B≤105.
For the 3rd file, T≤105,B≤109.
For the 4th file, T≤105,B≤1018.
OUTPUT:
For each test case, print the answer. Since the answer can be huge, print it modulo 109+7.
1+1+3=5
1+1+3+1=6
3+1+5+3+7+1+9=29