Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
Register

## Re:大侠们帮忙啊，为什么是WA？

Posted by boygod at 2006-03-06 18:40:06 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);
> 	}
> }
#include <stdio.h>
#include <math.h>
#define PI 3.1415926
int main()
{
int a,b,s,m,n;
double angle,v;

while (1)
{
scanf ("%d%d%d%d%d",&a,&b,&s,&m,&n);
if (a==0 && b==0 && s==0 && m==0 && n==0)
break;
angle=(atan((double)n*b/m/a)*180/PI);
v=(double)m*a/s/cos(angle*PI/180);
printf ("%.2lf %.2lf\n",angle,v);
}
}```

Followed by: