| ||||||||||
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:poj 1299 原谅我是渣渣 按理说输入100 50 90 输出的应该是18呀?In Reply To:poj 1299 原谅我是渣渣 Posted by:guojiale at 2015-04-24 12:01:49 > #include<stdio.h> > #include<stdlib.h> > #include<string.h> > #define PI 3.14159 > int main() > { > int x,y,z; > char reciv[11]; > while(1) > { > double dist,gallo_need; > scanf("%s",reciv); > if(strcmp(reciv,"ENDOFINPUT")==0) > break; > scanf("%d %d %d",&x,&y,&z); > scanf("%s",reciv) > if(z>180) > { > z=360-z; > } > dist=2*PI*x*z/360; > gallo_need=dist/5; > if(gallo_need>y) > { > printf("NO %d\n",y*5); > } > else > printf("YES %d\n",(int)(y-gallo_need)); > } > return 0; > } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator