/*
* POJ_1003.cpp
*
* Created on: 2013年10月14日
* Author: Administrator
*/
#include <iostream>
#include <cstdio>
using namespace std;
int main(){
double n;
while(scanf("%lf",&n)!=EOF,n !=0.00){
double sum = 0;
int counter = 1;
while(sum < n){
sum += (1.0/(counter+1) );
counter++;
}
printf("%d card(s)\n",counter-1);
}
return 0;
}
POJ 1003(累加)
最新推荐文章于 2014-11-30 20:03:22 发布