zju1045
HangOver
http://acm.zju.edu.cn/show_problem.php?pid=1045
/*written by czk*/
#include <stdio.h>
int main() {
while(1) {
double l, t;
int i;
scanf("%lf", &l);
if(l==0.0)
break;
t = 0.0;
for(i = 1; t<l ;i++)
t += 1.0/(i+1);
printf("%d card(s)\n", i-1);
}
}