Given Q queries, with each query consisting of two integers L and R, the task is to find the total numbers between L and R (Both inclusive), having atmost three set bits in their binary representation.
The first line of input contains number of testcases T. The 1st line of each testcase, contains a single integer Q denoting the number of queries. Each of the next Q lines, contain two space separated integers L and R denoting the range for that query.
For each query you need to print the total numbers between L and R having at most 3 set bits in their binary representation.
1 <= T <= 5
1 <= Q <= 105
0 <= L, R <= 1018