有点类似CF某场div2T1...
前面接上1234567890000000,后面加上x+(1234567890000000%x)就可以保证是x的倍数了
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
#include<iostream> #include<cstring> #include<cstdlib> #include<cstdio> #include<algorithm> #define ll long long using namespace std; const int maxn=500010,inf=1e9; int T,x; void read(int &k) { int f=1;k=0;char c=getchar(); while(c<'0'||c>'9')c=='-'&&(f=-1),c=getchar(); while(c<='9'&&c>='0')k=k*10+c-'0',c=getchar(); k*=f; } int main() { read(T); while(T--) { read(x); if(x)printf("1234567890%06lld ",1ll*x-(1234567890000000ll%x)); else printf("-1 "); } return 0; }