제출 #71739

#제출 시각아이디문제언어결과실행 시간메모리
71739퍼솔 가즈아ㅏㅏㅏ (#119)천사의 모래시계 (FXCUP3_hourglass)C++98
100 / 100
3 ms620 KiB
#include <cstdio> int a[20]={0,0,0,1,-1,1,2,4,2,3,2,3,4,3,4,3}; int main(){ int N; scanf("%d",&N); if(N<16) printf("%d",a[N]); else{ if(N%5==0) printf("%d",N/5); else if(N%5==1 || N%5==3) printf("%d",N/5+1); else printf("%d",N/5+2); } }

컴파일 시 표준 에러 (stderr) 메시지

hourglass.cpp: In function 'int main()':
hourglass.cpp:5:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&N);
     ~~~~~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...