#include <bits/stdc++.h> using namespace std; #define pb push_back typedef long long ll; int main(){ int T,n,k, t,a,b; cin>>T; while(T--){ cin>>n>>k; cout<<k/2<<"\n"; } }