| ||||||||||
| 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 | |||||||||
水!!!!!!!!!!!!#include<stdio.h>
int main()
{
int j,k,n,m;
double f,s,i;
while(scanf("%lf",&f)==1&&f!=0.0)
{
s=0.0;
for(i=2,j=0;s<f;i++,j++)
{
s+=1/i;
}
printf("%d card(s)\n",j);
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator