https://cn.vjudge.net/contest/285881
A - Live Love
已知n个note,m个perfect,n-m个nonperfect,也就是求最大连续perfect(m)以及最小(m分散n-m+1段向上取整)
#include<bits/stdc++.h>
using namespace std;
int main(){
int T;
cin>>T;
while(T--){
int n,m;
cin>>n>>m;
if(n==m) printf("%d %d\n",m,m);
else{
printf("%d %d\n", m, (m + n - m) / (n - m + 1));
}
}
return 0;
}