CodeForces 468 CHack it!

这是一道数学题

可惜我太菜了

只有看了题解才会做

#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;
}

  

posted @ 2019-02-15 11:46  古城独钓  阅读(84)  评论(0编辑  收藏  举报