# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
114030 | sebinkim | Cooking (innopolis2018_final_B) | C++14 | 3 ms | 400 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;
typedef long long ll;
int main()
{
ll k, d, t, p;
scanf("%lld%lld%lld", &k, &d, &t);
p = k * 2 + (d - k % d) % d;
printf("%.12lf\n", (t * 2 / p) * (k + (d - k % d) % d) + min(t * 2 % p, k * 2) * 0.5 + max(t * 2 % p - k * 2, 0ll));
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... |