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 564539492 at 2012-05-17 13:46:08 on Problem 1005
In Reply To:我感觉没问题啊,怎么通不过?求救! Posted by:ilazyboy at 2012-05-14 19:40:17
> #include<stdio.h>
> #define PI 3.141592635
> int main()
> {
> 	int i,n,year;
> 	float x,y,s;
> 	scanf("%d",&n);
> 	for(i=0;i<n;i++)
> 	{
> 		scanf("%f%f",&x,&y);
> 		s=0.5*PI*(x*x+y*y);
> 		if(s%50==0)
> 			year=s/50;
> 		else
> 			year=s/50+1;
> 		printf("Property %d:This property will begin eroding in year %d.\n",i+1,year);
> 	}
> 	printf("END OF OUTPUT.\N");
> 	return 0;
> }

1.s是float类型,50是整型,%是整型运算吧,我系统上gcc会报错
2.最后那个是printf("END OF OUTPUT.\n");你把回车符的n打成大写了……

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