Submission #7819

#TimeUsernameProblemLanguageResultExecution timeMemory
7819gs14092다각형 (GA5_polygon)C++98
Compilation error
0 ms0 KiB
#import<cstdio> long long x,y,r; main() { scanf("%lld%lld",&x,&y); if(x<3&&1<y)r-=2:1; x=(x+1)/2; y=b/2; r+=y*y+y-x*x+x;printf("%lld",r);}

Compilation message (stderr)

polygon.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
polygon.cpp:3:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
polygon.cpp: In function 'int main()':
polygon.cpp:6:21: error: expected ';' before ':' token
polygon.cpp:8:7: error: 'b' was not declared in this scope
polygon.cpp:5:28: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]