Submission #170334

#TimeUsernameProblemLanguageResultExecution timeMemory
170334ngmhCookie Clicker Alpha (GCJ14_cookie)C++11
19 / 19
4 ms504 KiB
#include <bits/stdc++.h> using namespace std; int tc; double c, f, x, t, cps; int main(){ cin >> tc; cout << fixed << setprecision(7); for(int i = 1; i <= tc; i++){ cin >> c >> f >> x; t = 0.0, cps = 2.0; while(x/cps >= x/(cps+f)+c/cps){ t += c/cps; cps += f; } t += x/cps; cout << "Case #" << i << ": " << t << "\n"; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...