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

无聊的题(附代码)

Posted by huang1shan2 at 2010-10-27 12:54:24 on Problem 1005
#include<iostream>
using namespace std;
#define PI 3.1415926
int main()
{
	float i,j;
	int n,m,k;
	m=k=1;
	cin>>n;
	while(n--)
	{
		cin>>i>>j;
		while((float)(100*(m++))/PI-i*i-j*j<0)
	        continue;
		cout<<"Property "<<k++<<": This property will begin eroding in year "<<m-1<<"."<<endl;
		m=1;
	}
	cout<<"END OF OUTPUT.";
	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