POJ-1005
来源:互联网 发布:赌球外围软件 编辑:程序博客网 时间:2024/06/05 15:16
#include <stdio.h>#include <math.h>#define PI 3.1415926int get_year(double x, double y);int main(void) { int n; int i = 0; double x, y; scanf("%d", &n); while (i < n) { i++; scanf("%lf%lf", &x, &y); printf("Property %d: This property will begin eroding in year %d.\n", i, get_year(x, y)); } printf("END OF OUTPUT.\n"); return 0;}int get_year(double x, double y) { int i = 0; double r = 0.0; double s = 0.0; double v = x * x + y * y; while (v > r * r) { s += 50; r = sqrt(2 * s / PI); i++; } return i;}
阅读全文
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
- 学习Git(分布式版本控制系统)——基础篇
- 集合及map体系
- Redis高可用架构
- Spring学习(1) IOC的含义,思想以及实现方法。
- Python实现回归树
- POJ-1005
- 数字签名相关概念介绍
- Java中遍历ConcurrentHashMap的四种方式
- composer中各个字段的说明
- Java——网络编程——UDP
- 【C++学习笔记】不知道算哪方面的问题~暂且认定为对STL的理解错误
- 屏幕单位转换代码
- python selenium 显示等待WebDriverWait与条件判断expected_conditions举例
- c++变量,初始化