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:这个程序挺简单的,为什么过不了呢?

Posted by 1108060046 at 2012-07-13 11:09:47 on Problem 1005
In Reply To:Re:这个程序挺简单的,为什么过不了呢? Posted by:20091845 at 2010-07-26 16:46:58
 #include<stdio.h>
 #define PI 3.141592635
 int main()
 {
 	int i,n,year;
 	float x[100],y[100],s; 	
	scanf("%d",&n);
	for(i=1;i<=n;i++) 
	{
 		scanf("%f%f",&x[i],&y[i]); 
	}
	for(i=1;i<=n;i++) 
	{

		s=0.5*PI*(x[i]*x[i]+y[i]*y[i]);
 		if((int)s%50==0)
 			year=(int)s/50;
		else
			year=(int)s/50+1;
	
		printf("Property %d: This property will begin eroding in year %d.\n",i,year);
	}
	
 	printf("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