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 sicheng at 2006-08-02 14:31:31 on Problem 1005
In Reply To:请伸出你的援助之手.... Posted by:snailly18 at 2006-07-24 23:15:04
> #include<stdio.h>
> #include<math.h>
> const double p=acos(-1);
> void main()
> {
> 	int time,i;
> 	float x=0,y=0;
> 	scanf("%d",&time);
> 	for(i=0;i<time;i++)
> 	{
> 		fflush(stdin);
> 		scanf("%f %f",&x,&y);
> 		float t=((x*x+y*y)*p)/100.0;
> 		printf("Property %d: This property will begin eroding in year %d.\n",i+1,int(t)+1);
> 	}
> 	printf("END OF OUTPUT.\n");
> }
> 一直wa,我快疯了....
> 指点迷津,大师....谢谢了.....

初看没什么问题。。。呵呵
不过最后一行我没加\n过了 如果不是这个问题就可能是精度 我用的double

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