#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
int main(){
int T;
cin>>T;
while(T--){
LL n,k;
cin>>n>>k;
LL g=sqrt(n);
LL cnt=(k+1)*k/2;
LL ans=0;
for(LL i=1;i<=g;i++){
if(n%i==0&&n>=cnt*i)
ans=i;
}
if(ans){
for(LL i=1;i<k;i++){
cout<<ans*i<<" ";
}
cout<<n-(ans*(k*(k-1)/2))<<endl;
}
else
cout<<"-1"<<endl;
}
return 0;
}
问题 E: E 最大GCD
最新推荐文章于 2020-09-23 11:42:28 发布