POJ 1005 I Think I Need a Houseboat 水题
2016-09-07 22:40
513 查看
题意是说从0点开始发水,每年发水面积为50,以圆形向外扩散,给出一个点问水什么时候蔓延到这个点(输出整数),一道数学题而已,算出这个点到圆心的距离,然后算以这个距离为半径的圆的面积,因为上面是半圆,所以处理面积的时候要用100进行计算而不是50,。
下面AC代码:
下面AC代码:
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; const double PI=3.1415926; int main() { int T; int k=0; double x,y; double a; int t; scanf("%d",&T); while(T--) { k++; scanf("%lf%lf",&x,&y); a=PI*(x*x+y*y); t=a/100+1; cout<<"Property "<<k<<": This property will begin eroding in year "<<t<<"."<<endl; if(T==0) cout<<"END OF OUTPUT."<<endl; } return 0; }
相关文章推荐
- POJ1005-I Think I Need a Houseboat(水题)
- poj 1005 I Think I Need a Houseboat(水题)
- POJ 1005 I Think I Need a Houseboat(水题)
- POJ 1005 I Think I Need a Houseboat (水题)
- POJ1005,I Think I Need a Houseboat,数学水题
- I Think I Need a Houseboat - POJ 1005 水题
- POJ 1005 I think I Need a Houseboat (水题)
- poj1005 I Think I Need a Houseboat 水题
- POJ 1005 I Think I Need a Houseboat 水题
- POJ - 1005 I Think I Need a Houseboat
- POJ 1005.I Think I Need a Houseboat
- poj1005 I Think I Need a Houseboat
- POJ 1005 I Think I Need a Houseboat
- POJ-1005 I Think I Need a Houseboat
- POJ1005 I Think I Need a Houseboat
- I Think I Need a Houseboat POJ 1005
- 整数返回poj1005——I Think I Need a Houseboat
- poj1005---I Think I Need a Houseboat
- POJ 1005 I Think I Need a Houseboat
- POJ 1005 I Think I Need a Houseboat