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:poj 1299 原谅我是渣渣 按理说输入100 50 90 输出的应该是18呀?

Posted by guojiale at 2015-04-24 12:02:31
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:
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