Submission #143191

#TimeUsernameProblemLanguageResultExecution timeMemory
143191bupjaeCookie Clicker Alpha (GCJ14_cookie)C++17
19 / 19
5 ms504 KiB
#include <iostream> using namespace std; double main2() { double c, f, x; cin >> c >> f >> x; double r = 2, t = 0; while ((x - c) / r > x / (r + f)) { t += c / r; r += f; } return t + x / r; } int main() { int t; cout.precision(10); cin >> t; for (int i = 1; i <= t; i++) { cout << "Case #" << i << ": " << main2() << "\n"; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...