Submission #71820

#TimeUsernameProblemLanguageResultExecution timeMemory
71820내일_개학이다_ㅠㅠ (#119)Angelic Hourglass (FXCUP3_hourglass)C++17
100 / 100
3 ms596 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("4\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); }

Compilation message (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...