HDU 1065 - I Think I Need a Houseboat

又是恶心人的水题

圆周率取3.1415926就啥事没有..

 1 #include <iostream>
 2 #include <cstdio>
 3 #include <cmath>
 4 using namespace std;
 5 double a,b;
 6 int n;
 7 int main()
 8 {    
 9     scanf("%d",&n);
10     for(int k=1;k<=n;k++)
11     {
12         for(int i=1;i<=n;i++)
13         {
14             scanf("%lf%lf",&a,&b);
15             int ans=(a*a+b*b)*(3.1415926)/100;            
16             printf("Property %d: This property will begin eroding in year %d.\n",k++,ans+1);
17         }
18         puts("END OF OUTPUT.");
19     }
20 } 

 

posted @ 2016-05-10 23:22  nicetomeetu  阅读(134)  评论(0编辑  收藏  举报