□Problem
省略.
□Solution
省略.
□Code
- package p2070;
- import java.util.*;
- import java.lang.*;
- import java.math.*;
- import java.io.*;
- import static java.lang.Math.*;
- import static java.util.Arrays.*;
- // AC
- public class Main{
- Scanner sc=new Scanner(System.in);
- final int INF=Integer.MAX_VALUE;
- final double EPS=1e-9;
- void run(){
- double[] speeds={4.5, 6.0, 5.0};
- double[] weights={150, 300, 200};
- double[] strengths={200, 500, 300};
- String[] ss={"Wide Receiver", "Lineman", "Quarterback"};
- for(;;){
- double speed=sc.nextDouble();
- double weight=sc.nextDouble();
- double strength=sc.nextDouble();
- if(speed==0&&weight==0&&strength==0)
- break;
- String ans="";
- for(int i=0; i<3; i++){
- if(speed<speeds[i]+EPS&&weight+EPS>weights[i]
- &&strength+EPS>strengths[i])
- ans+=ss[i]+" ";
- }
- if(ans.equals(""))
- println("No positions");
- else
- println(ans.substring(0, ans.length()-1));
- }
- }
- void print(String s){
- System.out.print(s);
- }
- void println(String s){
- System.out.println(s);
- }
- public static void main(String[] args){
- // System.setOut(new PrintStream(new BufferedOutputStream(System.out)));
- new Main().run();
- }
- }
0 件のコメント:
コメントを投稿