POJ-1005
来源:互联网 发布:python basehttpServer 编辑:程序博客网 时间:2024/05/22 18:55
#include<iostream>#include<cmath>//#include<algorithm>using namespace std;#define PI 3.1415926/*return: years*/int recursionFunc(float rCurrent, float xYMin){float r;if(rCurrent==0){r=sqrt(100.0/PI);}else{r=sqrt(100.0/PI+pow(rCurrent,2));}if(r>xYMin){return 1;}else{return 1+recursionFunc(r, xYMin);}}int main(int argc, char *argv[]){int n;float x,y;float r;cin>>n;for(int i=0;i<n;i++){cin>>x>>y;r=sqrt(pow(x,2)+pow(y,2));cout<<"Property "<<i+1<<": This property will begin eroding in year "<<recursionFunc(0,r)<<"."<<endl;}cout<<"END OF OUTPUT."<<endl;return 0;}
0 0
- POJ 1005
- POJ-1005
- POJ 1005
- poj 1005
- POJ 1005
- POJ 1005
- POJ 1005
- POJ-1005
- POJ 1005
- poj 1005
- POJ 1005
- poj 1005
- poj 1005
- POJ 1005
- poj 1005
- poj 1005
- poj 1005
- POJ-1005
- ubuntu10.10,安装flash插件
- 【代码片段】两列布局
- 加性高斯白噪声信道(AWGN)下的digital调制格式识别分类
- JavaScript Lexical Scope
- 转存
- POJ-1005
- 四种方案解决ScrollView嵌套ListView问题
- 王家林亲授《DT大数据梦工厂》大数据实战视频“Scala深入浅出实战经典”47
- 【数据结构之树状数组】
- 线性表的顺序存储设计和实现 - API函数实现
- 作用域链(Scope Chain)
- delphi 遍历所有文件夹
- 黑马程序员-IOS学习笔记 Xcode注释自动生成
- MySql 如果字段为NULL则返回0