E好的读懂题意就知道了
- //============================================================================
- // Name : 1005.cpp
- // Author : kevin
- // Version :
- // Copyright : copyright @ kevin
- // Description : Hello World in C++, Ansi-style
- //============================================================================
- #include <iostream>
- #include<cmath>
- using namespace std;
- int main() {
- double PI=3.1415926;
- double x,y,r,s;
- int t;
- int n;
- cin>>n;
- for(int i=1;i<=n;i++){
- cin>>x>>y;
- r=sqrt(x*x+y*y);
- s=PI*r*r/2;
- //cout<<s<<endl;
- t=(int)s/50+1;
- cout<<"Property "<<i<<":"<<" This property will begin eroding in year "<<t<<"."<<endl;
- }
- cout<<"END OF OUTPUT."<<endl;
- return 0;
- }