ZOJ-1394
来源:互联网 发布:标普下调中国评级 知乎 编辑:程序博客网 时间:2024/06/10 02:40
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);elsereturn "NO " + travel;}}
0 0
- ZOJ-1394
- ZOJ 1394 Polar Explorer
- zoj 1394 Polar Explorer
- ZOJ 1394 Polar Explorer
- zoj 1394 Polar Explorer
- ZOJ 1394 Polar Explorer
- ZOJ 1394 Polar Expoler
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ-1383
- Canny边缘检测算法原理及其VC实现详解(二)
- AndroidAnnotations——WorkingWithThreads线程操作
- Count and Say
- LED基本知识
- ZOJ-1394
- c4d学习笔记
- openfire 插件web工程web-custom.xml配置文件说明
- 深入浅出session
- CSS的inherit与auto
- SQL中排名函数
- android项目开发 统筹兼顾 需要考虑的内容
- cocos2dx之CCAnimate创建一个动画
- ZOJ-1402