uva 573 水题
来源:互联网 发布:淘宝客服子账号认证 编辑:程序博客网 时间:2024/05/16 09:31
#include <stdio.h>#include <iostream>#include <string.h>using namespace std ;#define eps 1e-8int main(){ //freopen("input.txt", "r", stdin) ; int h, u, d, f ; while(scanf("%d %d %d %d", &h, &u, &d, &f) && h){ double now = 0 ; double t = 1.0 * u * f / 100.0 ; double a = (double)(u) ; int res = 1 ; bool flag = 0 ; for(res =1; ; res++){ if(a > 0) now = now + a ; if(now > h){ flag = 1 ; break ; } now = now - d ; if(now < 0) break ; a = a - t ; } printf("%s on day %d\n", flag ? "success" : "failure", res) ; } return 0 ;}
- uva 573 水题
- uva 573 水题
- UVA UVa 272 水题
- Uva 573
- UVa-573
- uva-573
- UVA 573
- UVa 573 - The Snail
- uva - 573 the snail
- uva 573 The Snail
- uva 573 - The Snail
- UVa 573 - The Snail
- UVA 573 蜗牛
- UVa 573 - The Snail
- UVa 573 - The Snail
- UVA 573 The Snail
- UVA 573 (13.08.06)
- uva 573 - The Snail
- python自带的IDLE编辑工具主题设置
- Hbase 基础知识
- c++ primer智能指针简单实现
- [读书笔记]How to Get the Most of Studying
- hdu 3861
- uva 573 水题
- 关闭网页前 提示收藏该网页的js脚本
- Tombstone 实例分析 2
- win2003 IIS6配置PHP 5.3.3(fastCGI方式+eAccelerator)+ASP.NET 4.0(MVC3)
- ZOJ 3676 排序+二分
- (转)Android游戏开发之游戏帧动画的播放与处理(七)
- ZOJ 3682 简单dp 背包
- CSDN你很好
- poj 3624 (0-1背包)