POJ 1003 Hangover
来源:互联网 发布:富二代体验知乎 编辑:程序博客网 时间:2024/06/05 09:37
Hangover
题目链接:
http://poj.org/problem?id=1003
解题思路:
水题,直接上代码.
AC代码:
#include <iostream> #include <cstdio> using namespace std; int main(){ double n; while(scanf("%lf",&n)!=EOF){ if(n==0.00) break; double ans=0; int i,j; for(i=2,j=1;;i++,j++){ ans+=1.0/i; if(ans>n) break; } printf("%d card(s)\n",j--); } return 0; }
0 0
- POJ 1003--Hangover
- (POJ 1003)Hangover
- poj 1003Hangover
- POJ 1003 Hangover
- poj 1003 Hangover
- poj 1003(Hangover)
- 【POJ】1003 Hangover
- POJ-1003:Hangover
- [POJ]1003 Hangover
- POJ 1003 Hangover
- poj 1003 Hangover
- POJ 1003 Hangover
- 【POJ-1003】Hangover
- POJ-1003-Hangover
- poj 1003 Hangover
- POJ 1003 Hangover
- [POJ][1003]Hangover
- poj 1003 Hangover
- 管理学经典:林彪军团长教我怎样当好师长
- HDU5138 CET-6 test && BestCoder Round #21 1001
- IntelliJ IDEA 14 注册机代码
- IntelliJ IDEA 14 注册机代码
- HDU5139 Formula && BestCoder Round #21 1002
- POJ 1003 Hangover
- POJ1218 THE DRUNK JAILER
- POJ2590 Steps
- POJ2105 IP Address
- POJ2365 Rope
- [转]Android蓝牙开发浅谈
- POJ1298 The Hardest Problem Ever
- Flume+kafka+storm整合
- systemctl替代service与chkconfig