#include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; while(t--){ int l,r,x; cin>>l>>r>>x; if(l/x!=r/x){ cout<<1; }else{ cout<<l/x; } cout<<endl; } }
https://www.luogu.com.cn/record/80950983