BETA

Difficulty Level: Easy

Submissions: 546 Accuracy:

7.33%

Second Binary Digit
     

Given two numbers a and b find all the number between the given range whose second least significant digit in the binary representation of the number is 1.

Input:
The line contains T i.e. number of test cases. The next T line contains two integers a and b each.

Output:
For each of the test case print the corresponding answer in separate lines.

Constraints:
1<= T <= 10^5
1 <= a<=b <=10^9

Example:
Input

1
1 4
Output
2

Explanation
In the given range 2 (10) and 3 (11) are the numbers whose second least significant digit in its binary representation is 1.

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: ShivamKD

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.