Saturday 21 March 2009

POJ ( acm.pku.edu.cn ) 1005





#include <iostream>
#include <math.h>
using namespace std;
typedef unsigned int uint;

uint f(float x,float y){
float area=(x*x+y*y)/2.*3.141592652589793238;
return ceil(area/50.);
}

int main()
{
int N;cin>>N;
for(int i=1;i<=N;++i) {
float x,y; cin>>x>>y;
cout<<"Property "<<i<<": This property will begin eroding in year "
<<f(x,y)<<".\n";
}
cout<<"END OF OUTPUT.";
return 0;
}

No comments:

Post a Comment