Submission #1757842
Source Code Expand
#include<iostream> #include<iomanip> #include<math.h> #include<cstdlib> #include<algorithm> #include<string> #include<set> #include<vector> using namespace std; #define INF 1<<21 #define MOD 10e9+7 int main(){ int a,b; string aa,bb; int ans; int ai,bi; cin>>a>>b; aa=to_string(a); aa[0]='9'; ans=stoi(aa)-b; aa=to_string(a); aa[1]='9'; ans=max(ans,stoi(aa)-b); aa=to_string(a); aa[2]='9'; ans=max(ans,stoi(aa)-b); bb=to_string(b); bb[0]='1'; ans=max(ans,a-stoi(bb); bb=to_string(b); bb[1]='0'; ans=max(ans,a-stoi(bb); bb=to_string(b); bb[2]='0'; ans=max(ans,a-stoi(bb); cout<<ans<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - A - B problem |
User | tikictf |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 741 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:31:27: error: expected ‘)’ before ‘;’ token ans=max(ans,a-stoi(bb); ^ ./Main.cpp:34:27: error: expected ‘)’ before ‘;’ token ans=max(ans,a-stoi(bb); ^ ./Main.cpp:37:27: error: expected ‘)’ before ‘;’ token ans=max(ans,a-stoi(bb); ^