AtCoder Beginner Contest 001

Submission #223195

Source codeソースコード

mport java.util.*;
import java.math.*;
class Main{
        public static void main(String [] args){
                Scanner in = new Scanner(System.in);
                double deg = in.nextInt();
                double dis = in.nextInt();

                String dir = "N";

                int w = 0;
                double W = dis/60;

                BigDecimal s = new BigDecimal(String.valueOf(W));
                double S = s.setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue();

                if(deg>=112.5 && deg<337.5){
                        dir = "NNE";
                }
                if(deg>=337.5 && deg<562.5){
                        dir = "NE";
                }
                if(deg>=562.5 && deg<787.5){
                        dir = "ENE";
                }
                if(deg>=787.5 && deg<1012.5){
                        dir = "E";
                }
                if(deg>=1012.5 && deg<1237.5){
                        dir = "ESE";
                }
                if(deg>=1237.5 && deg<1462.5){
                        dir = "SE";
                }
                if(deg>=1462.5 && deg<1687.5){
                        dir = "SSE";
                }
                if(deg>=1687.5 && deg<1912.5){
                        dir = "S";
                }
                if(deg>=1912.5 && deg<2137.5){
                        dir = "SSW";
                }
                if(deg>=2137.5 && deg<2362.5){
                        dir = "SW";
                }
                if(deg>=2362.5 && deg<2587.5){
                        dir = "WSW";
                }
                if(deg>=2587.5 && deg<2812.5){
                        dir = "W";
                }
                if(deg>=2812.5 && deg<3037.5){
                        dir = "WNW";
                }
                if(deg>=3037.5 && deg<3262.5){
                        dir = "NW";
                }
                if(deg>=3262.5 && deg<3487.5){
                        dir = "NNW";
                }

                if(S>=0 && S<=0.2){
                        w = 0;
                }
                if(S>=0.3 && S<=1.5){
                        w = 1;
                }
                if(S>=1.6 && S<=3.3){
                        w = 2;
                }
                if(S>=3.4 && S<=5.4){
                        w = 3;
                }
                if(S>=5.5 && S<=7.9){
                        w = 4;
                }
                if(S>=8.0 && S<=10.7){
                        w = 5;
                }
                if(S>=10.8 && S<=13.8){
                        w = 6;
                }
                if(S>=13.9 && S<=17.1){
                        w = 7;
                }
                if(S>=17.2 && S<=20.7){
                        w = 8;
                }
                if(S>=20.8 && S<=24.4){
                        w = 9;
                }
                if(S>=24.5 && S<=28.4){
                        w = 10;
                }
                if(S>=28.5 && S<=32.6){
                        w = 11;
                }
                if(S>=32.7){
                        w = 12;
                }

                if(w==0){
                        dir = "C";
                }


                System.out.println(dir + " " + w);
        }
}

Submission

Task問題 C - 風力観測
User nameユーザ名 Satoko_R
Created time投稿日時
Language言語 Java (OpenJDK 1.7.0)
Status状態 CE
Score得点 -
Source lengthソースコード長 3392 Byte
File nameファイル名
Exec time実行時間 -
Memory usageメモリ使用量 -

Compiler messageコンパイルメッセージ

./Main.java:1: error: class, interface, or enum expected
mport java.util.*;
^
1 error

Test case