Submission #71805

#TimeUsernameProblemLanguageResultExecution timeMemory
71805the_general (#119)Angelic Hourglass (FXCUP3_hourglass)C++11
58 / 100
4 ms560 KiB
#include<stdio.h> int n; int main(){ scanf("%d", &n); if(n==4){ printf("-1\n"); return 0; } else if(n%5==0){ printf("%d\n", n/5); return 0; } else if(n%5==1){ printf("%d\n", n/5+1); return 0; } else if(n%5==3){ printf("%d\n", n/5+1); return 0; } else if(n%5==4){ printf("%d\n", n/5+2); return 0; } else{ printf("%d\n", n/5+3); return 0; } }

Compilation message (stderr)

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