Submission #71658

#TimeUsernameProblemLanguageResultExecution timeMemory
71658team (#119)Angelic Hourglass (FXCUP3_hourglass)C++98
58 / 100
5 ms636 KiB
#include <bits/stdc++.h> using namespace std; int main(){ int n;scanf("%d",&n); int ans=1e9; for(int i=0;i<=n/3; i++){ if(!((n-3*i)%5)){ ans=min(ans,i+(n-3*i)/5); } } if(ans>=1e9) ans=-1; printf("%d\n",ans); return 0; }

Compilation message (stderr)

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