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