现在的位置: 首页 > 综合 > 正文

poj1005

2014年01月25日 ⁄ 综合 ⁄ 共 324字 ⁄ 字号 评论关闭

链接http://poj.org/problem?id=1005

偶不是有意刷水题的,poj上自己没做的依次往后做的

#include<cstdio>
#define PI 3.1415926
int main() {
   freopen("poj1005.txt", "r", stdin);
   int n;
   scanf("%d", &n);
   double x, y;
   for(int k = 0; k < n; ++ k) {
      scanf("%lf%lf", &x, &y);
      printf("Property %d: This property will begin eroding in year %d.\n", k + 1, (int)(PI*(x*x + y*y)/100) + 1);
   }
   printf("END OF OUTPUT.\n");
   return 0;
}

抱歉!评论已关闭.