POJ.1003 Hangover ( 水 )
来源:互联网 发布:linux apache解析php 编辑:程序博客网 时间:2024/05/29 02:56
POJ.1003 Hangover ( 水 )
代码总览
#include <cstdio>#include <cstring>#include <algorithm>#include <cmath>#include <queue>#include <stack>#include <vector>#define nmaxusing namespace std;vector <double> v;void init(){ int temp = 2; double total = 0; v.push_back(0); while(total<=5.20){ total+=1.0/(1.0*temp); v.push_back(total); temp++; }}int main(){ init(); double num; while(scanf("%lf",&num) && num != 0.0){ int pos = lower_bound(v.begin(),v.end(),num) - v.begin(); printf("%d card(s)\n",pos); } return 0;}
阅读全文
0 0
- POJ.1003 Hangover ( 水 )
- POJ 1003 && HDU 1056 HangOver(水~)
- 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
- c c++版eclipse如何编译java项目
- Leetcode 270 Closest Binary Search Tree Value
- C#中读写INI文件的方法例子
- NYOJ-1 A+B问题
- 常用正则表达式
- POJ.1003 Hangover ( 水 )
- 理解Python并发编程-PoolExecutor篇
- CentOS 7 安装 MySQL
- Unicode和UTF-8有何区别
- 阿里怎么发工资?自研薪酬管理系统首次曝光
- 【知识点】iOS证书的类型用法和申请介绍
- Kernel Painc 调试
- 学历查询和专业代码查询
- 7. 引用其他脚本 (sourcing)