有点类似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=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;
}
View Code

相关文章:

  • 2021-09-30
  • 2021-10-16
  • 2022-03-08
  • 2021-09-20
  • 2021-07-03
  • 2021-11-01
  • 2021-08-13
  • 2022-12-23
猜你喜欢
  • 2021-08-03
  • 2021-11-04
  • 2021-10-10
  • 2022-12-23
  • 2022-12-23
  • 2021-10-08
相关资源
相似解决方案