 #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define rep(i,a,b) for(int i=a;i<b;i++)
#define mod 10000007
#define ll long long int 
using namespace std;
//using namespace boost::multiprecision;
int tot=INT_MAX;

void solving(){ 
  int n,k;
  cin>>n>>k;
  if(n>k){
    int temp ;
    if(n%k!=0)temp = n/k+1;
    else temp = n/k;
    k = k * temp;
  }
  if(k%n!=0){
    cout<<k/n+1<<"\n";
  }
  else cout<<k/n<<"\n";
} 
int main(){
     int tc;
     cin>>tc;
     //int i=1;
     while(tc--)
     {
      //cout<<"Case #"<<i<<": ";
      solving();
      //i++;
    }
      return 0;
}