| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
请各位看看,为什么老是Wrong Answer呢?#include <iostream>
#include <vector>
#include <math.h>
using namespace std;
int main()
{
int N ;
double X,Y;
cin >> N ;
if ( N == 0 )
cout<<"END OF OUTPUT."<<endl;
vector<int> yearVector;
double pi = 3.14 ;
double year;
double perYear = 50.0 ;
for ( int i = 0 ; i < N ; i ++ )
{
cin >> X >> Y ;
year = ( 0.5 * pi * ( X * X + Y * Y ) ) / perYear ;
yearVector.push_back( ceil ( year ) );
}
for ( int i = 0 ; i < N ; i ++ )
cout<<"Property "<<i<<": This property will begin eroding in year "<<yearVector[i]<<"."<<endl;
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator