#include<bits/stdc++.h>
using namespace std;
#define ll long long int 

int main()
{
    ll t,i,j;
    cin>>t;
    while(t--)
    {
        ll n,k;
        cin>>n>>k;
        bool ans;
        if(n>k)
        {
            if(n%k==0)
            k=(n/k)*k;
            else
           { ll p=n/k;
            k=(p+1)*k;
           }
        }
        if(k%n==0)
        ans=true;
        else
        ans=false;
        if(ans)
        cout<<k/n<<endl;
        else
        cout<<k/n+1<<endl;
    }
}