Given a number N, the task is to find the maximum 0’s between two immediate 1’s in binary representation of given n. Return -1 if binary representation contains less than two 1’s.
Input : N = 47
as binary of N = 47 is 101111
Input : N = 549
as binary of n = 549 is 1000100101
Input : N = 1030
as binary of N = 1030 is 10000000110
Input : N = 8
as there is only one 1 in binary representation of 8.
The first line of input contains an integer T denoting the no of test cases. Then T test cases follow. Each test case contains an integer N.
For each test case in a new line print the required result.