You are doing the study of amoeba. There are two types of beakers:
- Beaker1: Capacity to store infinite amoeba
- Beaker2: Capacity to store only \(N\) amoeba
On the first day, they put 1 amoeba in Beaker2 and after every 24 hours the total count of amoeba doubles.
\(day:\ 1\ \ 2\ \ 3\ \ 4\ \ 5\ \ 6\ \ .......\\
count: 1\ \ 2\ \ 4\ \ 8\ \ 16\ \ 32\ \ .......\)
If on any particular day Beaker2 overflows, then you transfer only \(N\) amoeba to Beaker1 and discard the rest of amoeba.
From the next day, you start with 1 amoeba again and repeat the process infinitely. Determine the number of days in which the total count amoeba crosses \(K\) (greater or equal).
Note
- Total count is equal to amoeba in Beaker1 + Beaker2
- Fission only takes place in Beaker2 not in Beaker1
Input format
- The first line contains a single integer \(T\) denoting the number of test cases. The description of \(T\) test cases follows.
- Each test case contains two integers denoting \(N\) and the value of \(K\).
Output format
For each test case, print a single line containing the number of days.
Constraints
\(1 ≤ T ≤ 10000\\ 2 ≤ N ≤1e18\\ 2 ≤ K ≤ 1e18\)
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Login to unlock the editorial
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor