CF468C Hack It! 构造
#include<cstdio> #include<iostream> #include<algorithm> #include<queue> #include<stack> using namespace std; typedef long long ll; ll a, b, INF = 1e18; int main(){ scanf("%lld",&a); b = (INF % a * 9 % a * 9 % a + 1 % a) % a; ll l = a - b + 1 , r = INF + a - b; printf("%lld %lld ", l , r); return 0; }
l≠0