POJ 1003 (水题)
来源:互联网 发布:剑道眼镜知乎 编辑:程序博客网 时间:2024/06/05 09:12
题意:给一个长度C,问卡片需要几张才能大于等于C,卡片伸出长度规律:最上边的为伸出1/2,接着下边的为1/3,1/4·····
#include<stdio.h>int main(){ double c; while(scanf("%lf",&c) != EOF) { if(c == 0.00) break; int i; double lenth = 0; for(i = 1;lenth < c; i++) lenth += 1.00/(i+1); printf("%d card(s)\n",i-1); } return 0;}
0 0
- POJ 1003 (水题)
- POJ 1003 Hangover (水题)
- POJ之1003(水题)
- poj 1003 水题
- Hangover - POJ 1003 水题
- poj 1003 hangover 水题
- POJ 1003 Hangover 水题
- (POJ 1003)Hangover
- poj 1003(Hangover)
- poj日记(1003)
- POJ 2027(水题)
- poj 3829(水题)
- POJ 1663(水题)
- POJ 1250 (水题)
- POJ 1493(水题)
- POJ 3673(水题)
- POJ 1083(水题)
- poj 3006(水题)
- sdut 3252 Lowest Unique Price set
- 二维数组查找目标值
- 第11周补充项目3-点类派生直线类
- 《七周七语言》之ruby练习2
- Interface Default Static
- POJ 1003 (水题)
- Caffe框架源码剖析(1)—构建网络
- Hello World
- 论文阅读:Dynamic Software Updates: A VM-centric Approach
- java中path和CLASSPATH的配置和意义解析
- Real-Time Rendering 翻译 2.渲染管线
- 蚁群算法解TSP问题
- [疯狂Java]基础类库:Runtime(运行时信息)
- 什么是Code Review(转)