import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();
while (!"ENDOFINPUT".equals(line.trim()))
{
while ("START".equals(line.trim()))
{
String s = sc.nextLine();
while (!"END".equals(s))
{
System.out.println(caculate(s));
s = sc.nextLine();
}
line = sc.nextLine();
}
}
}
static String caculate(String line)
{
String[] ss = line.split(" ");
int x = Integer.parseInt(ss[0]);
int y = Integer.parseInt(ss[1]);
int z = Integer.parseInt(ss[2]);
int angle = z > 180 ? 360 - z : z;
double distance = 3.14159 * x * angle / 90;
int travel = y * 5;
if (travel >= distance)
return "YES " + (int) ((travel - distance) / 5);
else
return "NO " + travel;
}
}
ZOJ-1394
最新推荐文章于 2020-07-28 10:31:24 发布