Submission #5211025


Source Code Expand

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,b;
    cin>>a>>b;/
    if(a/100-b/100<8) cout<<100*max(9-a/100,b/100-1)+a-b<<endl;
    else if((a%100)/10-(b%100)/10<9) cout<<10*max(9-(a%100)/10,(b%100)/10)+a-b<<endl;
    else cout<<max(9-a%10,b%10)+a-b<<endl;
    return 0;
}

Submission Info

Submission Time
Task A - A - B problem
User luogu_bot4
Language C++ (GCC 5.4.1)
Score 0
Code Size 303 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:5:15: error: expected primary-expression before ‘/’ token
     cin>>a>>b;/
               ^
./Main.cpp:6:5: error: expected primary-expression before ‘if’
     if(a/100-b/100<8) cout<<100*max(9-a/100,b/100-1)+a-b<<endl;
     ^
./Main.cpp:7:5: error: ‘else’ without a previous ‘if’
     else if((a%100)/10-(b%100)/10<9) cout<<10*max(9-(a%100)/10,(b%100)/10)+a-b<<endl;
     ^