| ||||||||||
| 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(){
double c,t=0;
scanf("%lf",&c);
while(c!=0){
int i;
t=0;
for(i=2;;i++){
t+=1.0/i;
if(t>=c)break;
}
printf("%d card(s)\n",i-1);
scanf("%lf",&c);
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator