hdu-1056 HangOver

#include<stdio.h>
int main()
{
   double n,temp,t;
   while(~scanf("%lf",&n),n!=0.00)
   {
    temp=0;
    t=2.0;
     while(n>temp)
  {
    temp+=1/t;
    t++;
  }
    printf("%.lf card(s)\n",t-2);  
   }
  return 0;
}水果。。。。。。。。。。虽然试了好多次。。。。

posted @ 2015-12-17 13:57  wojiaohuangyu  阅读(7)  评论(0)    收藏  举报