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:God! Who Help Me!

Posted by chenhaifeng at 2006-09-21 17:08:23 on Problem 2666
In Reply To:God! Who Help Me! Posted by:wanpi0user at 2005-11-03 16:45:25
> Which error made me WRONG? Help me, please!
> //849215 wanpi0user 2666 Wrong Answer     C++ 
> #include<stdio.h>
> #include<math.h>
> #define M_PI 3.141592653589793
> int main(){
> 	int a,d,u;int t;
> 	double fa,fd,fu;
> 	while(scanf("%d%d%d",&u,&a,&d)!=EOF){
> 		if((u==0)&&(a==0)&&(d==0)) return 0;
> 		fa=a;fd=d;fu=u;fa=tan(fa/180*M_PI);
> 		if(fa<0.0) fa=0-fa;
> 		t=floor(fa*fd/2/fu+0.5);
> 		if(t>10000) printf("God help me!\n"); 
> 		else printf("%d\n",t);
> 	}
> 	return 0;
> }
M_PI=cos(-1)

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