Consider the integer N = 45 whose binary representation is 101101. The resulting number formed after swapping each even bit with its adjacent bit to the right will be 30 (011110) in this case.
The first line of the input contains an integer, 'T,’ denoting the number of test cases.
The first and only line of each test case contains the integer 'N'.
For each test case, print the resulting integer formed after swapping each even bit.
Print the output of each test case in a new line.
You do not need to print anything. It has already been taken care of. Just implement the given function.
1 <= T <= 10^5
1 <= N <= 10^9
Time Limit: 1 sec
Detect Odd
Detect Odd
Ninja And The Clan
Check whether K-th bit is set or not
Check whether K-th bit is set or not
Maximum Element
XOR DARE