//1_3_1: I think I need a houseboat 河水淹没土地 POJ1005 ZOJ1049
#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
const double pi = 3.1415926;
int main()
{
int tem,N,i = 1;
double x,y,ans;
scanf("%d",&N);
while(N --)
{
scanf("%lf%lf",&x,&y);
ans = (x * x + y * y) * pi / 2 / 50;
tem = (int)ans;
if(ans > tem) tem++;
printf("Property %d: This property will begin eroding in year %d.\n",i ++,tem);
}
printf("END OF OUTPUT.\n");
return 0;
}
/*测试结果:通过POJ1005 ZOJ1049检测
2
1.0 1.0
Property 1: This property will begin eroding in year 1.
25.0 0.0
Property 2: This property will begin eroding in year 20.
END OF OUTPUT.
请按任意键继续. . .
*/
POJ1005 ZOJ1049 I think I need a houseboat
最新推荐文章于 2017-06-17 01:19:01 发布