Submission #4432718
Source Code Expand
#include<bits/stdc++.h> using namespace std; int n,m,ans=-2333333,x,y; void emmm() { ans=max(ans,(x%100+900-y)); ans=max(ans,((x/100)*100+x%10+90)-y); ans=max(ans,x+9-x%10-y); ans=max(ans,x-(y%100+100)); ans=max(ans,x-((y/100)*100+y%10)); ans=max(ans,x-(y-y%10)); return 0; } int main() { scanf("%d%d",&n,&m); x=n,y=m; emmm(); cout<<ans<<'\n'; return 0; } //子函数只有两行qwq~打错了个字awa嘤嘤嘤
Submission Info
Submission Time | |
---|---|
Task | A - A - B problem |
User | luogu_bot3 |
Language | C++ (GCC 5.4.1) |
Score | 0 |
Code Size | 438 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘void emmm()’: ./Main.cpp:7:12: error: return-statement with a value, in function returning 'void' [-fpermissive] return 0; ^ ./Main.cpp: In function ‘int main()’: ./Main.cpp:11:24: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d",&n,&m); ^