Submission #717843

#TimeUsernameProblemLanguageResultExecution timeMemory
717843EntityPlanttscanf 함수 5 (BSC_0_7)C++14
0 / 100
0 ms212 KiB
#include<cstdio> main(){int a,b;scanf("%d%d",&a,&b);if((a+b)%2)printf("%d.5",(a+b)/2);else printf("%d",a+b);}

Compilation message (stderr)

scanf5.cpp:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){int a,b;scanf("%d%d",&a,&b);if((a+b)%2)printf("%d.5",(a+b)/2);else printf("%d",a+b);}
      | ^~~~
scanf5.cpp: In function 'int main()':
scanf5.cpp:2:21: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    2 | main(){int a,b;scanf("%d%d",&a,&b);if((a+b)%2)printf("%d.5",(a+b)/2);else printf("%d",a+b);}
      |                ~~~~~^~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...