poj1005
来源:互联网 发布:程序员 刷题 哪个好 编辑:程序博客网 时间:2024/05/14 08:08
水题:题意不懂,是看了别人的解题报告才知道什么意思,鄙视自己的英语
#include<stdio.h>#include<math.h>#include<string.h>#include<algorithm>#include<map>#include<set>#include<queue>#include<vector>#include<iostream>#include<stack>using namespace std;const double pi=3.1415926;int main(void){ int n; scanf("%d",&n); for(int i=1;i<=n;i++) { double x,y; scanf("%lf %lf",&x,&y); double sum=0.0; double distance=sqrt(x*x+y*y);//距离 double r=0.0; int cn=0; while(r<distance) { sum+=50.0; r=sqrt((sum*2.0)/pi); cn++; } printf("Property %d: This property will begin eroding in year %d.\n",i,cn); if(i==n) printf("END OF OUTPUT.\n"); } return 0;}
0 0
- poj1005
- poj1005
- poj1005
- POJ1005
- POJ1005
- poj1005
- poj1005
- POJ1005
- POJ1005
- poj1005
- POJ1005
- poj1005
- poj1005
- Poj1005
- poj1005
- POJ1005
- poj1005
- poj1005
- 三种循环的练习——将1到100以内包含6的数字打印出来
- 常用的内存管理算法的简要介绍
- HTML - html之间传值并接收
- XAMPP 修改MYSQL密码以及无法启动MYSQL的解决方案
- oracle 拼接备忘录
- poj1005
- 读取文件内容
- poj3274--Gold Balanced Lineup(hash)
- while循环和for循环
- for循环练习——打印九九乘法表
- POJ 1151 Atlantis(重叠矩阵面积和=离散化)
- 前端工程师应该具备的三种思维
- static与非static
- Android之TelephonyManager类的方法详解