/*
* POJ_1005.cpp
*
* Created on: 2013年10月14日
* Author: Administrator
*/
#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
const double PI = 3.141592653;
int main(){
int t;
scanf("%d",&t);
int counter = 1;
while(t--){
double x,y;
scanf("%lf%lf",&x,&y);
double r = sqrt(x*x + y*y);
double target = PI*r*r/2;
double sum = 0;
int years = 0;
while(sum < target){
sum+=50;
years++;
}
printf("Property %d: This property will begin eroding in year %d.\n",counter++,years);
}
printf("END OF OUTPUT.\n");
return 0 ;
}
POJ 1005(累加)
最新推荐文章于 2015-04-24 16:06:17 发布