#include<bits/stdc++.h>
typedef long long int ll;
#define io ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define fr(i,l,r) for(ll i=l;i<r;i++)
#define lop ll t;cin>>t;while(t--)
#define maxi 1000
#define mod 1000000007
#define f first
#define s second
ll dp[maxi];
using namespace std;


/*

a1 + a2 +... +an = k*m
		long n,k;
		
		cin>>n>>k;if(k<n){
			k=n/k*k+(n%k!=0)*k;
		}
		cout<<k/n+(k%n!=0)<<endl;




*/


void solve(){
    ll n , k ; cin >> n >> k ;
    if(k < n) k = k*(n/k) + (n%k != 0)*k ;
    cout << k/n + (k%n != 0) << endl ;
}


int main(){
    io;
    int t ; cin >> t ;
    while(t--){
        solve() ;
    }
    return 0;
}