# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
147611 | yoni | Angelic Hourglass (FXCUP3_hourglass) | C++11 | 2 ms | 396 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 <iostream>
int main() {
int N;
scanf("%d", &N);
int cnt5 = N/5;
N -= cnt5 * 5;
int cnt3 = -1;
while (cnt5 >= 0) {
if (N % 3 == 0) {
cnt3 = N / 3;
break;
}
cnt5--;
N += 5;
}
printf("%d", cnt3==-1?-1:cnt3+cnt5);
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... |