http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1045
#include <stdio.h> int main() { float c; while(scanf("%f", &c) && c !=0) { int i = 2; float fResult = 0; while (fResult < c) { fResult += 1.00/i; i++; } printf("%d card(s)\n", i - 2); } return 0; }