20分求调
查看原帖
20分求调
1403459
parheps楼主2024/10/14 23:13
#include<bits/stdc++.h>
#define ull unsigned long long
using namespace std;
ull t,n,k;
int main() {
cin>>t;
for(ull i=1;i<=t;i++){
	cin>>n>>k;
	if(k==0)cout<<1;
	else cout<<n/k-n/(k+1)<<endl;
}
	return 0;
}
2024/10/14 23:13
加载中...