#include<bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);
#define int long long
#define inf 1000000000
#define pii pair<int,int>
#define fi first
#define se second

signed main(){
	int t;
	cin>>t;
	while(t--){
		int n,k;
		cin>>n>>k;
		if(n>k){
		    k=k*(n/k+(n%k!=0));
		}
		int ans=k/n;
		if(k%n)ans++;
		cout<<ans<<'\n';
	}
   	return 0;
}