POJ. 1005 I Think I Need a Houseboat(水 )

POJ. 1005 I Think I Need a Houseboat(水 )

代码总览

#include <cstdio>
#include <cstring>
#include <cmath>
#include <queue>
#include <stack>
#include <vector>
#define nmax
using namespace std;
const double pi = acos(-1);
int main()
{
    double x,y ;
    int n;
    scanf("%d",&n);
    for(int i =1;i<=n;++i){
        scanf("%lf %lf" ,&x,&y);
        double rf  = x*x + y*y;
        double area = pi*rf /2;
        printf("Property %d: This property will begin eroding in year %d.
",i,(int)ceil(area / 50.0));
    }
    printf("END OF OUTPUT.
");
    return 0;
}
原文地址:https://www.cnblogs.com/pengwill/p/7367075.html