POJ 1003.Hangover
来源:互联网 发布:mysql修复数据表 编辑:程序博客网 时间:2024/06/05 05:35
题目:http://icpc.njust.edu.cn/Problem/Pku/1003/
AC代码(C++):
#include <iostream>#include <stdio.h>#include <algorithm>#include <iomanip>#include <string.h>#include <map>using namespace std;int main(void) {float a;cin >> a;while (a != 0) {float b = 0;for (int i = 1;; i++) {b += 1.0 / (i + 1);if (b >= a) {cout << i << " card(s)" << endl;break;}}cin >> a;}//system("pause");}
总结:水题
0 0
- 【POJ】1003. Hangover
- POJ 1003.Hangover
- POJ 1003.Hangover
- POJ Hangover
- POJ-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
- 欢迎使用CSDN-markdown编辑器
- 自动导入上传数据的注意事项
- IE6中盒子绝对定位不起效果的解决方法
- python3.5 安装scrapy
- 51Nod - 1639 递推
- POJ 1003.Hangover
- spring装配bean(基于注解)
- 深入浅出讲解:php的socket通信
- Cocos Creator使用小记
- eclipse没有(添加)"Dynamic Web Project"选项的方法
- HDU2044 一只小蜜蜂...
- Leetcode 26. Remove Duplicates from Sorted Array
- 游戏编程中的人工智能技术一书的附录
- ZK设计原理简述