답안 #834647

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
834647 2023-08-22T16:27:42 Z dugersuren scanf 함수 5 (BSC_0_7) C++14
100 / 100
1 ms 212 KB
#include<cstdio>
main(){int a,b;
scanf("%d%d",&a,&b);
printf("%.*f",(a+b)%2!=0,(a+b)/2.0);
}

Compilation message

scanf5.cpp:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){int a,b;
      | ^~~~
scanf5.cpp: In function 'int main()':
scanf5.cpp:3:6: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    3 | scanf("%d%d",&a,&b);
      | ~~~~~^~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct