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

Re:Am I wrong~~?_Whyyyyyyyyyy~?

Posted by hellobuy at 2007-01-20 10:09:05 on Problem 1005
In Reply To:Am I wrong~~?_Whyyyyyyyyyy~? Posted by:joyan at 2006-12-01 11:47:41
> #include<stdio.h>
> 
> #define PI 3.14159265358979
> 
> int main()
> {
> 	int n,i;
> 	double x,y;
> 	double l,pl;
> 	int now=1;
> 
> 	scanf("%d",&n);
> 	for(i=0;i<n;i++)
> 	{
> 		l=100.0/PI;
> 		scanf("%lf%lf",&x,&y);
> 		pl=x*x+y*y;
> 		while (pl>l)
> 		{
> 			l+=100/PI;
> 			now++;
> 		}
> 		printf("Property %d: This property will begin eroding in year %d.\n",i+1,now);
> 	}
> 	printf("END OF OUTPUT.\n");
> 	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