Submission #114030

#TimeUsernameProblemLanguageResultExecution timeMemory
114030sebinkimCooking (innopolis2018_final_B)C++14
100 / 100
3 ms400 KiB
#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)

B.cpp: In function 'int main()':
B.cpp:11:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld%lld%lld", &k, &d, &t);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...