hdu-1056 HangOver

来源:互联网 发布:unity3d培训 编辑:程序博客网 时间:2024/06/07 09:50
#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;}水果。。。。。。。。。。虽然试了好多次。。。。

0 0
原创粉丝点击