北大ACM(POJ1005-I Think I Need a Houseboat)

时间:2023-03-08 19:27:55
北大ACM(POJ1005-I Think I Need a Houseboat)
Question:http://poj.org/problem?id=1005
问题点:计算半圆面积及向上取整。
 Memory: 256K        Time: 0MS
Language: C++ Result: Accepted #include <iostream> using namespace std;
#define pi 3.1415926
#define Num 200 int main()
{
int N;
double pos[Num][];
cin>>N;
for(int i=;i<N;i++)
{
cin>>pos[i][]>>pos[i][];
}
for(int i=;i<N;i++)
{
cout<<"Property "<<i+<<": This property will begin eroding in year "<<(int)(pi*(pos[i][]*pos[i][]+pos[i][]*pos[i][])/)+<<"."<<endl;
}
cout<<"END OF OUTPUT."<<endl;
return ;
}