-
个人简介
#include<bits/stdc++.h> using namespace std; long long a[18]={}; int main() { a[0]=1; for(int i=1;i<=18;i++) { a[i]=a[i-1]*10; } long long x,y; cin>>y>>x; x=y-x; for(int i=17;i>=0;i--) { long long cnt=(y/a[i])*a[i]-1; if(cnt+a[i]<=y) { cnt+=a[i]; } if(cnt>=x) { cout<<cnt; return 0; } } cout<<y; return 0; }
-
通过的题目
-
最近活动
This person is lazy and didn't join any contests or homework. -
最近编写的题解
This person is lazy and didn't write any solutions.