| ||||||||||
| 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 | |||||||||
我都要疯了.WA了n次,就是找不出错误啊!大哥门帮帮忙啊!#include<stdio.h>
#include<string.h>
int main()
{ int x,y,z;
double alph,pi=3.14159,L,L1,Y;
char s[15],t[15];
while(1)
{ scanf("%s",s);
if(strcmp(s,"ENDOFINPUT")==0)break;
scanf("%d %d %d",&x,&y,&z);
scanf("%s",t);
if(z>180)z=360-z;
alph=z*pi/180;
L=alph*x*2;
//printf("%.0f\n",L);
L1=y*5;
Y=y-L/5;
if(L1>L)printf("YES %.0f\n",Y);
else
printf("NO %.0f\n",L1);
}
// while(1);
}
/*
START
1 100 0
END
START
10 0 1
END
START
100 50 90
END
START
100 50 270
END
ENDOFINPUT
Sample Output
YES 100
NO 0
NO 250
NO 250
*/
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator