| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:God! Who Help Me!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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator