답안 #7819

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
7819 2014-08-19T10:35:27 Z gs14092 다각형 (GA5_polygon) C++
컴파일 오류
0 ms 0 KB
#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

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]