# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
887534 | rainboy | Cooking (innopolis2018_final_B) | C11 | 1 ms | 420 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 <stdio.h>
int main() {
long long k, d, t, q, r, ans2;
scanf("%lld%lld%lld", &k, &d, &t), d *= (k + d - 1) / d, t *= 2;
q = t / (k + d), r = t % (k + d);
ans2 = q * d * 2 + (r <= k * 2 ? r : (r - k) * 2);
printf("%lld.%d\n", ans2 / 2, ans2 % 2 == 0 ? 0 : 5);
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |