# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
71659 | team (#119) | Angelic Hourglass (FXCUP3_hourglass) | C++98 | 4 ms | 588 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;scanf("%d",&n);
int ans=1e9;
for(int i=0;(3*i)<=n;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)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |