| ||||||||||
| 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 | |||||||||
Re:水!!!!!!!!!!!!In Reply To:水!!!!!!!!!!!! Posted by:CristianoRonaldo at 2015-03-10 20:44:56 > #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