이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |