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:大侠们帮忙啊,为什么是WA?

Posted by fmlwlh at 2006-08-29 01:58:32 on Problem 2641
In Reply To:大侠们帮忙啊,为什么是WA? Posted by:Callyou at 2005-12-14 00:28:02
> 给的数据过了的说:(
> 
> #include <stdio.h>
> #include <math.h>
> 
> void main ()
> {
> 	int a, b, s, m, n;
> 	scanf("%d%d%d%d%d",&a,&b,&s,&m,&n);
> 	while (a)
> 	{
> 		printf("%.2f %.2f\n", atan((double) b * n / a / m) * 2 / 3.1415926 * 90, sqrt( (double)a * a * m * m + b * b * n * n) / s );
> 		scanf("%d%d%d%d%d",&a,&b,&s,&m,&n);
> 	}
> }
可能pi精度不够,建议用acos(-1)代替,还有要特殊处理m==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