Submission #108651
Source Code Expand
object Main { def main(args: Array[String]) = { val (a, b) = readf2("{0} {1}") val deg = Integer.parseInt(a.asInstanceOf[String]) val dis = Integer.parseInt(b.asInstanceOf[String]) val w = dis match { case dis if dis < 0.25 * 60 => 0 case dis if dis < 1.55 * 60 => 1 case dis if dis < 3.35 * 60 => 2 case dis if dis < 5.45 * 60 => 3 case dis if dis < 7.95 * 60 => 4 case dis if dis < 10.75 * 60 => 5 case dis if dis < 13.85 * 60 => 6 case dis if dis < 17.15 * 60 => 7 case dis if dis < 20.75 * 60 => 8 case dis if dis < 24.45 * 60 => 9 case dis if dis < 28.45 * 60 => 10 case dis if dis < 32.65 * 60 => 11 case _ => 12 } val dir = if (w==0) { "C" } else { deg * 10 match { case d if 1125 <= d && d < 3375 => "NNE" case d if 3375 <= d && d < 5625 => "NE" case d if 5625 <= d && d < 7875 => "ENE" case d if 7875 <= d && d < 10125 => "E" case d if 10125 <= d && d < 12375 => "ESE" case d if 12375 <= d && d < 14625 => "SE" case d if 15625 <= d && d < 16875 => "SSE" case d if 16875 <= d && d < 19125 => "S" case d if 19125 <= d && d < 21375 => "SSW" case d if 21375 <= d && d < 23625 => "SW" case d if 23625 <= d && d < 25875 => "WSW" case d if 25875 <= d && d < 28125 => "W" case d if 28125 <= d && d < 30375 => "WNW" case d if 30375 <= d && d < 32625 => "NW" case d if 32625 <= d && d < 34875 => "NNW" case _ => "N" } } print(dir) print(" ") println(w) } }
Submission Info
Submission Time | |
---|---|
Task | C - 風力観測 |
User | shogo82148 |
Language | Scala (2.9.1) |
Score | 0 |
Code Size | 1757 Byte |
Status | WA |
Exec Time | 1063 ms |
Memory | 38932 KB |
Judge Result
Set Name | all | ||||
---|---|---|---|---|---|
Score / Max Score | 0 / 100 | ||||
Status |
|
Set Name | Test Cases |
---|---|
all | 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, 00_sample_05.txt, 00_sample_06.txt, 00_sample_07.txt, 00_sample_08.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt, test_21.txt, test_22.txt, test_23.txt, test_24.txt, test_25.txt, test_26.txt, test_27.txt, test_28.txt, test_29.txt, test_30.txt, test_31.txt, test_32.txt, test_33.txt, test_34.txt, test_35.txt, test_36.txt, test_37.txt, test_38.txt, test_39.txt, test_40.txt, test_41.txt, test_42.txt, test_43.txt, test_44.txt, test_45.txt, test_46.txt, test_47.txt, test_48.txt, test_49.txt, test_50.txt, test_51.txt, test_52.txt, test_53.txt, test_54.txt, test_55.txt, test_56.txt, test_57.txt, test_58.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_01.txt | AC | 950 ms | 38796 KB |
00_sample_02.txt | AC | 921 ms | 38824 KB |
00_sample_03.txt | AC | 921 ms | 38836 KB |
00_sample_04.txt | AC | 911 ms | 38792 KB |
00_sample_05.txt | AC | 993 ms | 38748 KB |
00_sample_06.txt | AC | 931 ms | 38812 KB |
00_sample_07.txt | AC | 905 ms | 38756 KB |
00_sample_08.txt | AC | 914 ms | 38796 KB |
test_01.txt | AC | 962 ms | 38876 KB |
test_02.txt | AC | 980 ms | 38792 KB |
test_03.txt | AC | 985 ms | 38792 KB |
test_04.txt | AC | 988 ms | 38832 KB |
test_05.txt | AC | 1059 ms | 38868 KB |
test_06.txt | AC | 939 ms | 38808 KB |
test_07.txt | AC | 970 ms | 38780 KB |
test_08.txt | AC | 949 ms | 38800 KB |
test_09.txt | AC | 943 ms | 38796 KB |
test_10.txt | AC | 923 ms | 38924 KB |
test_11.txt | AC | 914 ms | 38784 KB |
test_12.txt | AC | 997 ms | 38804 KB |
test_13.txt | AC | 949 ms | 38880 KB |
test_14.txt | AC | 985 ms | 38932 KB |
test_15.txt | AC | 942 ms | 38784 KB |
test_16.txt | AC | 987 ms | 38828 KB |
test_17.txt | AC | 1009 ms | 38792 KB |
test_18.txt | AC | 1011 ms | 38796 KB |
test_19.txt | AC | 988 ms | 38812 KB |
test_20.txt | AC | 993 ms | 38756 KB |
test_21.txt | AC | 1001 ms | 38836 KB |
test_22.txt | AC | 989 ms | 38840 KB |
test_23.txt | AC | 994 ms | 38820 KB |
test_24.txt | AC | 990 ms | 38772 KB |
test_25.txt | AC | 946 ms | 38928 KB |
test_26.txt | AC | 955 ms | 38744 KB |
test_27.txt | AC | 933 ms | 38800 KB |
test_28.txt | AC | 941 ms | 38920 KB |
test_29.txt | AC | 937 ms | 38920 KB |
test_30.txt | AC | 910 ms | 38692 KB |
test_31.txt | AC | 919 ms | 38788 KB |
test_32.txt | AC | 948 ms | 38796 KB |
test_33.txt | AC | 928 ms | 38912 KB |
test_34.txt | AC | 957 ms | 38928 KB |
test_35.txt | AC | 937 ms | 38804 KB |
test_36.txt | AC | 956 ms | 38928 KB |
test_37.txt | AC | 922 ms | 38920 KB |
test_38.txt | AC | 918 ms | 38804 KB |
test_39.txt | AC | 943 ms | 38808 KB |
test_40.txt | AC | 921 ms | 38796 KB |
test_41.txt | AC | 926 ms | 38792 KB |
test_42.txt | AC | 932 ms | 38816 KB |
test_43.txt | AC | 939 ms | 38916 KB |
test_44.txt | AC | 939 ms | 38796 KB |
test_45.txt | AC | 930 ms | 38796 KB |
test_46.txt | AC | 948 ms | 38848 KB |
test_47.txt | AC | 931 ms | 38792 KB |
test_48.txt | AC | 937 ms | 38796 KB |
test_49.txt | WA | 925 ms | 38780 KB |
test_50.txt | AC | 935 ms | 38796 KB |
test_51.txt | AC | 929 ms | 38864 KB |
test_52.txt | AC | 936 ms | 38748 KB |
test_53.txt | AC | 926 ms | 38888 KB |
test_54.txt | AC | 923 ms | 38924 KB |
test_55.txt | AC | 927 ms | 38876 KB |
test_56.txt | AC | 943 ms | 38804 KB |
test_57.txt | AC | 1063 ms | 38880 KB |
test_58.txt | AC | 991 ms | 38800 KB |