573 - The Snail
来源:互联网 发布:合法的c语言标识符 编辑:程序博客网 时间:2024/06/06 02:42
#include <iostream>using namespace std;int main(){ double H,U,D,F,count,j; int i,flag; while(cin>>H>>U>>D>>F) { if(H==0&&U==0&&D==0&&F==0)break; else { count=0; flag=0; j=U/100*F; for(i=0;; i++) { if(i>=1) U=U-j; if(U<0)U=0; count+=U; if(count>H) { flag=1; break; } count=count-D; if(count<0)break; } if(flag==1)cout<<"success on day "<<i+1<<endl; else cout<<"failure on day "<<i+1<<endl; } } return 0;}
- UVa 573 - The Snail
- uva - 573 the snail
- uva 573 The Snail
- uva 573 - The Snail
- UVa 573 - The Snail
- 573 - The Snail
- UVa 573 - The Snail
- 573 - The Snail
- UVa 573 - The Snail
- 573 - The Snail
- UVA 573 The Snail
- uva 573 - The Snail
- uva 573 The Snail
- UVA 573 The Snail
- 573 - The Snail
- UVa 573 - The Snail
- Uva 573 The Snail
- UVA - 573 The Snail
- SDL入门教程(二):3、中途装载与退出,SDL错误信息
- vim笔记
- JDBC连接SQL Server2008基本格式及示例代码
- 107 - The Cat in the Hat
- WVGA VGA QVGA QWVGA是什么意思
- 573 - The Snail
- 软件天才与技术民工的关系
- Ubuntu下安装apache httpd
- SDL入门教程(三):1、如何实现按下ESC退出程序?
- vlc当服务器广播2
- 846 - Steps
- Oracle通过sqlplus spool导入/出数据
- SDL入门教程(三):2、显示一张BMP位图。
- 10499 - The Land of Justice