思路:求出在x,y点的面积,除以每年的腐蚀面积,向上取整,使用ceil()函数
#include <iostream>
using namespace std;
#define PI 3.141592653
int main()
{
int test_num;
cin >> test_num;
double x,y;
double area;
int year;
for(int i = 1 ; i <= test_num; i++)
{
cin >> x;
cin >> y;
area = (x * x + y * y) * PI / 2;
year = int(area/50)+1;
cout << "Property " << i <<": This property will begin eroding in year " << year <<"." <<endl;
}
cout << "END OF OUTPUT" << endl;
}