
The first line contains an integer ‘T’ denoting the number of test cases. Then each test case follows.
The first input line of each test case contains two space-separated integers ‘K’ and ‘L’ as described in the problem.
For each test case, print the maximum possible number of houses that are yet to be covered under the vaccination drive.
The output of each test case will be printed in a separate line.
You are not required to print the expected output, it has already been taken care of. Just implement the function.
1 <= T <= 50
1 <= ‘K’ <= N
1 <= ‘L’ <= 30
Where ‘T’ is the number of test cases, ‘K’, ‘N’ and ‘L’ are described in the problem statement.
Time limit: 1 sec
We know that a maximum of 2^L numbers can be represented using ‘L’ bits. Therefore a maximum possible value for ‘N’ will be 2^L. Hence, the maximum possible number of remaining houses will be 2^L - K.
We can use the inbuilt pow() function.
We can also use the left shift operator for calculating 2 ^ L.