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 |
poj做的第二题吧,第一次丢了card还给wa了。。诸位知道5.20什么的有什么用么..?//poj做的第二题吧,第一次丢了card还给wa了。。 //貌似根本不用考虑5.20什么的限制条件? #include<stdio.h> int main(){ float a=0; while(scanf("%f",&a)!= EOF&&a!=0.00) { int i=0; float s=0; while(s<a) s=s+(float)1/(++i+1); printf("%d card(s)\n",i); } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator