HDOJ 1065(PE)

#include <iostream>

using namespace std;

int main()
{
int m;
cin>>m;
for(int j=0;j<m;j++)
{
    double x,y;
    double area;
    cin>>x>>y;
    double r=x*x+y*y;
    area=3.1415926*r*.5;
    int n=static_cast<int>((area/50)+0.9999999);
    cout<<"Property "<<j+1<<": This property will begin eroding in year "<<n<<"."<<endl;
}
    cout<<"END OF OUTPUT.";
    return 0;
}

原文地址:https://www.cnblogs.com/CKboss/p/3351133.html