| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
为什么总是 wrong Answer! 各位大侠帮帮我!快疯了,这也错了!#include <stdio.h>
#define zero 0.000001
main()
{
float leng;
float temp;
int i;
while(leng!=0)
{
scanf("%f",&leng);
temp=0;
for(i=1;i<32767;i++)
{ if((temp-leng)>zero)
{printf("%d card(s)\n",i-1);
break;}
temp=temp+1.00/(float)(i+1);
}
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator