Timer is Running

Midori and chocolates
Submissions: 863   Accuracy:


  Difficulty: Basic   Marks: 1

Midori like chocolates and he loves to try different ones. There are N shops in a market labelled from 1 to N and each shop offers a different variety of chocolate. Midori starts from ith shop and goes ahead to each and every shop. But as there are too many shops Midori would like to know how many more shops he has to visit. You have been given L denoting number of bits required to represent N. You need to print the maximum number of shops he can visit.


The first line of the input contains T denoting number of test cases.

First line of each test case contains two integers,i and L. 


You need to print the required answer in a new line.






Sample Input:


2 3

Sample Output:


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

Author: thedsk8

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

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

to report an issue on this page.