POJ-1005

来源:http://poj.org/problem?id=1005

怎么POJ前面的题都那么水= =

#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;

#define pi 3.1415926

int main()
{
    int N;
    cin>>N;
    for (int Ncase=1;Ncase<=N;Ncase++)
    {
        double x,y;
        cin>>x>>y;
        double k=x*x+y*y;
        double kk=k*pi/2;
        int s=floor(kk/50.0)+1;
        cout<<"Property "<<Ncase<<": This property will begin eroding in year "<<s<<"."<<endl;
    }
    cout<<"END OF OUTPUT."<<endl;
    return 0;
}
posted @ 2012-12-12 09:20  ay27  阅读(122)  评论(0)    收藏  举报