


i) Multiply ‘X’ by 2
ii) Subtract 1 from ‘X’
The first line of the input contains ‘T’ denoting the number of test cases.
The first line of each test case contains the two integers ‘X’ and ‘Y’.
For each test case, print a single line containing a single integer denoting the minimum number of operations needed.
The output of each test case will be printed in a separate line.
You do not need to print anything; it has already been taken care of. Just implement the given function.
1 <= T <= 20
0 <= X, Y <= 10 ^ 5
Where ‘T’ denotes the number of test cases
Time Limit: 1 sec.
Explanation:
Algorithm:
Explanation:
Algorithm: