有点类似CF某场div2T1...
前面接上1234567890000000,后面加上x+(1234567890000000%x)就可以保证是x的倍数了
#include<iostream>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<algorithm>
#define ll long long
using namespace std;
const int maxn=,inf=1e9;
int T,x;
void read(int &k)
{
int f=;k=;char c=getchar();
while(c<''||c>'')c=='-'&&(f=-),c=getchar();
while(c<=''&&c>='')k=k*+c-'',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 ;
}