http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=49
水题
#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std; bool judge(double x,double y,double r)
{
return x*x+y*y < r*r;
} int main()
{
int t;
cin>>t;
for(int i = ;i<=t;i++)
{
double m,n;
cin>>m>>n;
int y;
cout<<"Property "<<i<<": ";
for(int y = ;;y++)
{
int S = *y;
double r = sqrt((double)S/3.1415926);
if(judge(m,n,r))
{
cout<<"This property will begin eroding in year "<<y<<"."<<endl;
break;
}
}
}
cout<<"END OF OUTPUT."<<endl;
}