Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

为什么结果一样,却总是WA呢?高手帮忙一下~~

Posted by 200630554298 at 2008-05-17 02:12:52 on Problem 1005
#include<iostream>
using namespace std;
int main(){
	const double PI = 3.14159265358979;
	double x, y;
	int N;
    cin >> N;
	double *year = new double[N];
	for(int i = 0; i < N; i++){
		cin >> x >>y;
		year[i] = 0.5 * PI * ( x * x + y * y) / 50;
	}
	for(int i = 0; i < N; i++)
		cout<<"Property "<< i + 1 << ": This property will begin eroding in year "<< int(year[i]) + 1 << "." <<endl;
	return 0;
 } 

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator