Recently in JEC ants have become huge, the Principal is on a journey to snipe them !!
Principal has limited $N$ practice Bullets to practice so that he can be sure to kill ants.
- The Practice ground has max length $L$.
- There is a Limit X such that if the bullet is fired beyond this, it will destroy and it wont be of any further use.
- Bullet can be reused if fired in a range strictly less than X.
He wants to find minimum number of shots taken to find  the distance X by using $N$ bullets.

-----Input:-----
- First line will contain $T$, number of testcases. Then the testcases follow. 
- Each testcase contains of a single line of input, two integers $N, L$. 

-----Output:-----
For each testcase, output in a single line answer the minimum number of shots to find the distance X.

-----Constraints-----
- $1 \leq T \leq 10$
- $2 \leq N,L \leq 100$
*N is always less than  equal to square root of L

-----Subtasks-----
- 10 points : $ N = 1$
- 40 points : $ N = 2$
- 50 points : Original Constraints.

-----Sample Input:-----
2
1 10
2 10

-----Sample Output:-----
10
4

-----EXPLANATION:-----
- 
There is only single bullet which is to be fired from distance 1 to 10 to get the distance X so in the worst case it can take up to 10 shots to find the distance X.
- 
there are 2 bullets and distance 10 meters suppose if distance X is 10 we can get to that by firing first bullet at 4 then 7 then 9 then  at 10 it will break  it took only 4 turns, and if the distance X was 3, we can get that by firing first bullet at 4 it will get destroyed than we use 2nd bullet at 1 , 2, 3  and 2nd bullet will also break it also took 4 turns. You can check for any position minimum number of turns will be at most 4.

Starter code:

Solutions:
# cook your dish here

from sys import stdin,stdout
from collections import deque,defaultdict
from math import ceil,floor,inf,sqrt,factorial,gcd,log
from copy import deepcopy
ii1=lambda:int(stdin.readline().strip())
is1=lambda:stdin.readline().strip()
iia=lambda:list(map(int,stdin.readline().strip().split()))
isa=lambda:stdin.readline().strip().split()
mod=1000000007

for _ in range(ii1()):
 n,l=iia()
 if n==1:
  print(l)
 elif n==2:
  print(int(log2(10))+1)
 else:
  print(ceil(l/(n+1)))


# cook your dish here
import math
t=int(input())
while t>0:
 n,l=list(map(int,input().split()))
 if n==1:
  print(l)
 elif n==2:
  ans=(n-1)//2
  print(ans)
   
 t-=1

import sys
def eggDrop(n, k): 
 if (k == 1 or k == 0): 
  return k 
 
 if (n == 1): 
  return k 
 
 min = sys.maxsize 

 for x in range(1, k + 1): 
 
  res = max(eggDrop(n - 1, x - 1),  
     eggDrop(n, k - x)) 
  if (res < min): 
   min = res 
 
 return min + 1
for _ in range(int(input())):
 n,l = [int(i) for i in input().split()]
 if(n == 1):
  print(l)
 else:
  print(eggDrop(n,l))

import sys
def eggDrop(n, k): 
 if (k == 1 or k == 0): 
  return k 
 
 if (n == 1): 
  return k 
 
 min = sys.maxsize 

 for x in range(1, k + 1): 
 
  res = max(eggDrop(n - 1, x - 1),  
     eggDrop(n, k - x)) 
  if (res < min): 
   min = res 
 
 return min + 1
for _ in range(int(input())):
 n,l = [int(i) for i in input().split()]
 if(n == 1):
  print(l)
 else:
  print(eggDrop(l,n))

def fac(a):
 s=1
 for i in range(1,a+1):
  s=s*i
 return s

def prime(n):
 n=int(n)
 if(n==2 or n==3):
  return 1
 k=n**(1/2)
 for i in range(2,int(k)+2):
  if(n%i==0):
   return 0
 return 1


def sieve(n):
 arr=[]
 prime = [True for i in range(n+1)]
 p = 2
 while (p * p <= n):
  if (prime[p] == True):
   for i in range(p * 2, n+1, p):
    prime[i] = False
  p += 1
 for p in range(2, n):
  if prime[p]:
   arr.append(p)
 return arr




t=int(input())
# n,m=[int(x) for x in input().split()]

for ii in range(t):
 n, m = [int(x) for x in input().split()]
 if(n==1):
  print(m)
 else:
  if(m%2==0):
   m-=1
  print(m//2)












# cook your dish here
import math
t=int(input())
while t>0:
 n,l=list(map(int,input().split()))
 if n==1:
  print(l)
 elif n==2:
  ans=0
  while l>0:
   ans+=1 
   l=l//2
  print(ans)
   
 t-=1

# cook your dish here
t=int(input())
while(t):
 t=t-1
 N,L = map(int,input().split())
 if N==1:
  print(L)
 elif N==2:
  z = (8*L+1)**0.5
  z= z - 1
  z=z/2
  if z-int(z)>0:
   print(int(z)+1)
  else:
   print(int(z))
 else:
  if L%N==0:
   print(L//N)
  else:
   print(1+(L//N))

import math
for _ in range(int(input())):
 n,l = [int(i) for i in input().split()]
 if(n == 1):
  print(l)
 else:
  print(math.floor(l/(n+1)) + 1)

# cook your dish here
import math
t=int(input())
while t>0:
 n,l=list(map(int,input().split()))
 if n==1:
  print(l)
 elif n==2:
  for i in range(1,101):
   if l//i==2:
    print(i)
    break
   
 t-=1

# cook your dish here
try:
 t=int(input())
 for i in range (t):
  n,m=list(map(int,input().split()))
  if n==1:
   print(m)
  elif n==2:
   print((m//2)-1)
except EOFError as e:
 pass


T = int(input())
for _ in range(T):
 n, l = map(int,input().split())
 if n == 1:
  print(l)

# cook your dish here
import math
t=int(input())
while t>0:
 n,l=list(map(int,input().split()))
 if n==1:
  print(l)
 elif n==2:
  ans=n*2
  print(ans)
   
 t-=1

# cook your dish here
t=int(input())
while(t):
 t=t-1
 N,L = map(int,input().split())
 if N==1:
  print(L)
 elif N==2:
  z = (8*L+1)**0.5
  z= z - 1
  z=z/2
  if z-int(z)>0:
   print(int(z)+1)
  else:
   print(int(z))
 else:
  print("Fuck me")

# cook your dish here
import math
t=int(input())
while t>0:
 n,l=list(map(int,input().split()))
 if n==1:
  print(l)
 elif n==2:
  ans=math.sqrt(l)
  k=int(ans)
  if k*k==ans:
   print(k)
  else:
   print(k+1)
   
 t-=1

# cook your dish here
test = int(input())
for t in range(test):
 n,l = input().split()
 n,l = int(n),int(l)
 if(n==1):
  print(l)
 elif(n==2):
  if(l%2==0):
   print((l//2)-1)
  else:
   print((l//2)-2)
 else:
  print((l//n) -1)

# cook your dish here
def nextPowerOf2(n): 
 count = 0; 
 
 # First n in the below  
 # condition is for the  
 # case where n is 0 
 if (n and not(n & (n - 1))): 
  return n 
  
 while( n != 0): 
  n >>= 1
  count += 1
  
 return 1 << count; 
 
 
T=int(input())
for i in range(0,T):
 N,L=list(map(int,input().split()))
 l=1
 j=N**l
 if(N==1):
  print(L)
 elif(N==2):
  n=nextPowerOf2(L)
  print(n)
  
 
   
   
   
  


# cook your dish here
import math
t=int(input())
while t>0:
 n,l=list(map(int,input().split()))
 if n==1:
  print(l)
 elif n==2:
  ans=math.sqrt(l)
  k=int(ans)
  print(k+1)
   
 t-=1

# cook your dish here
def nextPowerOf2(n): 
 count = 0; 
 
 # First n in the below  
 # condition is for the  
 # case where n is 0 
 if (n and not(n & (n - 1))): 
  return n 
  
 while( n != 0): 
  n >>= 1
  count += 1
  
 return 1 << count; 
 
 
T=int(input())
for i in range(0,T):
 N,L=list(map(int,input().split()))
 l=1
 j=N**l
 if(N==1):
  print(L)
 elif(N==2):
  print(4)
  
 
   
   
   
  


# cook your dish here
t=int(input())
while(t):
 t=t-1
 N,L = map(int,input().split())
 if N==1:
  print(L)
 elif N==2:
  z = (8*L+1)**0.5
  z= z - 1
  z=z/2
  z=int(z)
  print(z)
 else:
  print("Fuck me")

# cook your dish here
for _ in range(int(input())):
 n,l=map(int,input().split(" "))
 if(n==1):
  print(l)
 if(n==2):
  print((l//n)-1)

# cook your dish here
test = int(input())
for t in range(test):
 n,l = input().split()
 n,l = int(n),int(l)
 if(n==1):
  print(l)
 elif(n==2):
  print((l//2)-1)
 else:
  print(l//n)

# cook your dish here
t=int(input())
while(t):
 t=t-1
 N,L = map(int,input().split())
 if N==1:
  print(L)
 elif N==2:
  z = (8*L+1)**0.5
  z= z - 1
  z=z/2
  z=int(z)
  print(z)
 else:
  print("Fuck me")