HDU 1065

又是恶心人的水题

圆周率取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.
",k++,ans+1);
17         }
18         puts("END OF OUTPUT.");
19     }
20 } 
我自倾杯,君且随意
原文地址:https://www.cnblogs.com/nicetomeetu/p/5479843.html