제출 #71818

#제출 시각아이디문제언어결과실행 시간메모리
71818내일_개학이다_ㅠㅠ (#119)천사의 모래시계 (FXCUP3_hourglass)C++17
58 / 100
3 ms700 KiB
#include<bits/stdc++.h> using namespace std; int main(){ int n; scanf("%d", &n); if(n == 4) printf("-1\n"); else if(n == 7) printf("-1\n"); else if(n%5 == 0) printf("%d\n", n/5); else if(n%5 == 1) printf("%d\n", n/5+1); else if(n%5 == 2) printf("%d\n", n/5+2); else if(n%5 == 3) printf("%d\n", n/5+1); else if(n%5 == 4) printf("%d\n", n/5+2); }

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

hourglass.cpp: In function 'int main()':
hourglass.cpp:6: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...