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

Wrong answer

Posted by 200892458 at 2008-12-19 16:24:23 on Problem 1005
#include<stdio.h>
#define pi 3.14159
int main()
{
	float x[100],y[100];
	int b[100];
	int n,i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%f%f",&x[i],&y[i]);
	}
	for(i=0;i<n;i++)
	{
		b[i]=(int)(pi*(x[i]*x[i]+y[i]+y[i])/100+1);
	}
	for(i=0;i<n;i++)
	{
		if(x[i]==0&&y[i]==0)
			;
	    else
		    printf("Property %d: This property will begin eroding in year %d.\n",i+1,b[i]);
	}
	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