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 n, ans[] = {0, 0, 0, 1, -1, 1, 2, 3, 2, 3, 2, 3, 4, 3, 4};
int main() {
cin >> n;
if (n<15) cout << ans[n];
else {
if (n%5==0) cout << n/5;
if (n%5==1) cout << n/5+1;
if (n%5==2) cout << n/5+2;
if (n%5==3) cout << n/5+1;
if (n%5==4) cout << n/5+2;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |