poj 1005 水题

  有点无聊,AC水题玩.....

  

这道题的大致意思:
  圆表示一块面积可扩展的区域,开始时,面积是0,在(0,0)处开始以每年50平方米的速度同样呈半圆扩展,输入一个正整数N,然后输入N对坐标,对于每一对坐标值:求出面积扩展到该点的年数,坐标值单位为米。
  
则年份数为, Pi*( sqrt(x*x+y*y) )^2 / (50*2) 向上取整
View Code
#include<stdio.h>
#include<math.h>
const double Pi = 3.1415926;
int main()
{
    int T;
    scanf("%d",&T);
    for(int ca = 1; ca <= T; ca++)
    {
        double x, y;
        scanf("%lf%lf", &x, &y);
        printf( "Property %d: This property will begin eroding in year ", ca);
        printf("%d.\n", (int)ceil( Pi*(x*x+y*y)/100. ) );
    }
    printf("END OF OUTPUT.\n");
    return 0;
}
原文地址:https://www.cnblogs.com/yefeng1627/p/2844451.html