Description
Input
Output
Sample Input
2 1.0 1.0 25.0 0.0
Sample Output
Property 1: This property will begin eroding in year 1. Property 2: This property will begin eroding in year 20. END OF OUTPUT.
Hint
#include <iostream>
#include<cmath>
using namespace std;
double PI=3.14 ;
int main()
{
int n,s;
double x,y;
cin>>n;
for(int i=1;i<=n;i++)
{
cin>>x>>y;
x = (x*x + y*y)* PI / 2 / 50;
s=x;
if(x-s>0)
s++;
printf("Property %d: This property will begin eroding in year %d.\n", i, s);
}
printf("END OF OUTPUT.\n");
return 0;}D - I Think I Need a Houseboat(1.3.1),布布扣,bubuko.com
D - I Think I Need a Houseboat(1.3.1)
原文:http://blog.csdn.net/rememberautumn/article/details/37738059