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;
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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |