有点类似CF某场div2T1...
前面接上1234567890000000,后面加上x+(1234567890000000%x)就可以保证是x的倍数了
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.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\n",1ll*x-(1234567890000000ll%x)); else printf("-1\n"); } return 0; }