Submission #8238

#TimeUsernameProblemLanguageResultExecution timeMemory
8238baneling100Cookie Clicker Alpha (GCJ14_cookie)C++98
19 / 19
20 ms1088 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...