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.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'def fac(a):\n s=1\n for i in range(1,a+1):\n  s=s*i\n return s\n\ndef prime(n):\n n=int(n)\n if(n==2 or n==3):\n  return 1\n k=n**(1/2)\n for i in range(2,int(k)+2):\n  if(n%i==0):\n   return 0\n return 1\n\n\ndef sieve(n):\n arr=[]\n prime = [True for i in range(n+1)]\n p = 2\n while (p * p <= n):\n  if (prime[p] == True):\n   for i in range(p * 2, n+1, p):\n    prime[i] = False\n  p += 1\n for p in range(2, n):\n  if prime[p]:\n   arr.append(p)\n return arr\n\n\n\n\nt=int(input())\n# n,m=[int(x) for x in input().split()]\n\nfor ii in range(t):\n n, m = [int(x) for x in input().split()]\n if(n==1):\n  print(m)\n else:\n  if(m%2==0):\n   m-=1\n  print(m//2)\n\n\n\n\n\n\n\n\n\n\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13429