N=10**8 S=int(input()) for i in range(S): a,b=map(int,input().split()) ans=N//b print(ans)