Hangover
http://poj.org/problem?id=1003
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
#include<stdio.h> int main() { float c ; while(scanf("%f", &c),c!=0) { int i = 0; float sum = 0 ; while(sum<c) { i++ ; sum += 1.0/(i+1) ; } printf("%d card(s)\n", i) ; } return 0 ; }
已知c=1/2+1/3+1/4+....1/(n+1).现给出一个值m,求n的值使得c刚好超过m。