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 <stdio.h>
#define INF 0x7fffffff
int T;
double C, F, X, V, Time, Ans;
int main(void) {
int i, j;
scanf("%d",&T);
for(i=1 ; i<=T ; i++) {
scanf("%lf %lf %lf",&C,&F,&X);
Ans=INF;
Time=0;
V=2.0;
while(Ans>Time) {
if(Ans>Time+X/V)
Ans=Time+X/V;
Time+=C/V;
V+=F;
}
printf("Case #%d: %.7lf\n",i,Ans);
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |