标签:
#include <iostream> using namespace std; int main() { double len; while(cin >> len && len) { double sum = 0.0; double i = 1.0; int n = 2; while(sum < len) { sum += i/n; ++n; } cout << n-2 << " card(s)" <<endl; } return 0; }
标签:
原文地址:http://www.cnblogs.com/guoyongheng/p/5721856.html