#include<iostream>
using namespace std;
int main()
{
double t = 0,s=0;
int c=0;
while (1)
{
cin >> t;
if (t == 0.00) break;
while (1)
{
if (s > t) break;
s += 1.0 / (c + 2);
c++;
}
cout << c << " card(s)" << endl;
c = 0;
s = 0;
}
return 0;
}
poj1003
最新推荐文章于 2017-11-01 15:58:31 发布