这是一道数学题
可惜我太菜了
只有看了题解才会做
#include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; const long long inf=1e18; inline long long read(){ long long x=0,f=1,ch=getchar(); while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1;ch=getchar();} while(ch>=‘0‘&&ch<=‘9‘){x=x*10+ch-‘0‘;ch=getchar();} return x*f; } int main(){ long long mod=read(); long long ans=mod-9*inf%mod*9%mod; printf("%lld %lld\n",ans,ans+inf-1); return 0; }
原文:https://www.cnblogs.com/gcyyzf/p/10382843.html