Submission #108436
Source Code Expand
import java.util.*; class Main { public static void main (String[] args) throws java.lang.Exception { Scanner sc = new Scanner(System.in); int deg = sc.nextInt(); double dis = sc.nextDouble(); String x =""; int y =0; if (deg < 112.5|| deg >=3487.5) x = "N"; else if (deg >= 112.5 && deg < 337.5) x="NNE"; else if (deg >= 337.5 && deg < 562.5) x="NE"; else if (deg >= 562.5 && deg < 787.5) x="ENE"; else if (deg >= 787.5 && deg < 1012.5) x="E"; else if (deg >= 1012.5 && deg < 1237.5) x="ESE"; else if (deg >= 1237.5 && deg < 1462.5) x="SE"; else if (deg >= 1462.5 && deg < 1687.5) x="SSE"; else if (deg >= 1687.5 && deg <1912.5) x="S"; else if (deg >= 1912.5 && deg < 2137.5) x="SSW"; else if (deg >= 2137.5 && deg <2362.5) x="SW"; else if (deg >= 2362.5 && deg <2587.5) x="WSW"; else if (deg >= 2587.5 && deg <2812.5) x="W"; else if (deg >= 2812.5 && deg < 3037.5) x="WNW"; else if (deg >=3037.5 && deg <3262.5) x="NW"; else if (deg >=3262.5 && deg <3487.5) x="NNW"; double z = (Math.round(dis/6)); z = z/10; //System.out.println(z); if (z <= 0.2) y=0; if (z >= 0.3 && z <=1.5) y=1; if (z >= 1.6 && z <=3.3) y=2; if (z >= 3.4 && z <=5.4) y=3; if (z >= 5.5 && z <=7.9) y=4; if (z >= 8.0 && z <= 10.7) y=5; if (z >= 10.8 && z <= 13.8) y=6; if (z >= 13.9 && z <=17.1) y=7; if (z >= 17.2 && z <=20.7) y=8; if (z >= 20.8 && z <=24.4) y=9; if (z >= 24.5 && z <=28.4) y=10; if (z >= 28.5 && z <= 32.6) y=11; if (z >= 32.7) y=12; if (y==0) x="C"; System.out.println(x+" "+y); } } /* N (北) 他のいずれにも当てはまらない S (南) 168.75 度以上 191.25 度未満 NNE (北北東) 11.25 度以上 33.75 度未満 SSW (南南西) 191.25 度以上 213.75 度未満 NE (北東) 33.75 度以上 56.25 度未満 SW (南西) 213.75 度以上 236.25 度未満 ENE (東北東) 56.25 度以上 78.75 度未満 WSW (西南西) 236.25 度以上 258.75 度未満 E (東) 78.75 度以上 101.25 度未満 W (西) 258.75 度以上 281.25 度未満 ESE (東南東) 101.25 度以上 123.75 度未満 WNW (西北西) 281.25 度以上 303.75 度未満 SE (南東) 123.75 度以上 146.25 度未満 NW (北西) 303.75 度以上 326.25 度未満 SSE (南南東) 146.25 度以上 168.75 度未満 NNW (北北西) 326.25 度以上 348.75 度未満 風力 風速 風力 風速 風力 風速 風力0 0.0m⁄s 以上 0.2m⁄s 以下 風力5 8.0m⁄s 以上 10.7m⁄s 以下 風力10 24.5m⁄s 以上 28.4m⁄s 以下 風力1 0.3m⁄s 以上 1.5m⁄s 以下 風力6 10.8m⁄s 以上 13.8m⁄s 以下 風力11 28.5m⁄s 以上 32.6m⁄s 以下 風力2 1.6m⁄s 以上 3.3m⁄s 以下 風力7 13.9m⁄s 以上 17.1m⁄s 以下 風力12 32.7m⁄s 以上 風力3 3.4m⁄s 以上 5.4m⁄s 以下 風力8 17.2m⁄s 以上 20.7m⁄s 以下 風力4 5.5m⁄s 以上 7.9m⁄s 以下 風力9 20.8m⁄s 以上 24.4m⁄s 以下 */
Submission Info
Submission Time | |
---|---|
Task | C - 風力観測 |
User | R2D2S2 |
Language | Java (OpenJDK 1.7.0) |
Score | 100 |
Code Size | 3369 Byte |
Status | AC |
Exec Time | 514 ms |
Memory | 23608 KB |
Judge Result
Set Name | all | ||
---|---|---|---|
Score / Max Score | 100 / 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 | 459 ms | 23476 KB |
00_sample_02.txt | AC | 463 ms | 23480 KB |
00_sample_03.txt | AC | 479 ms | 23480 KB |
00_sample_04.txt | AC | 489 ms | 23604 KB |
00_sample_05.txt | AC | 474 ms | 23476 KB |
00_sample_06.txt | AC | 471 ms | 23600 KB |
00_sample_07.txt | AC | 444 ms | 23476 KB |
00_sample_08.txt | AC | 480 ms | 23484 KB |
test_01.txt | AC | 470 ms | 23476 KB |
test_02.txt | AC | 457 ms | 23596 KB |
test_03.txt | AC | 451 ms | 23468 KB |
test_04.txt | AC | 463 ms | 23472 KB |
test_05.txt | AC | 473 ms | 23472 KB |
test_06.txt | AC | 445 ms | 23468 KB |
test_07.txt | AC | 448 ms | 23460 KB |
test_08.txt | AC | 456 ms | 23480 KB |
test_09.txt | AC | 455 ms | 23476 KB |
test_10.txt | AC | 442 ms | 23604 KB |
test_11.txt | AC | 455 ms | 23600 KB |
test_12.txt | AC | 461 ms | 23600 KB |
test_13.txt | AC | 447 ms | 23480 KB |
test_14.txt | AC | 457 ms | 23476 KB |
test_15.txt | AC | 475 ms | 23468 KB |
test_16.txt | AC | 451 ms | 23472 KB |
test_17.txt | AC | 469 ms | 23476 KB |
test_18.txt | AC | 473 ms | 23608 KB |
test_19.txt | AC | 478 ms | 23476 KB |
test_20.txt | AC | 504 ms | 23336 KB |
test_21.txt | AC | 442 ms | 23472 KB |
test_22.txt | AC | 451 ms | 23476 KB |
test_23.txt | AC | 440 ms | 23476 KB |
test_24.txt | AC | 500 ms | 23560 KB |
test_25.txt | AC | 455 ms | 23480 KB |
test_26.txt | AC | 446 ms | 23568 KB |
test_27.txt | AC | 445 ms | 23604 KB |
test_28.txt | AC | 449 ms | 23476 KB |
test_29.txt | AC | 466 ms | 23476 KB |
test_30.txt | AC | 451 ms | 23476 KB |
test_31.txt | AC | 446 ms | 23476 KB |
test_32.txt | AC | 445 ms | 23472 KB |
test_33.txt | AC | 434 ms | 23468 KB |
test_34.txt | AC | 449 ms | 23480 KB |
test_35.txt | AC | 440 ms | 23608 KB |
test_36.txt | AC | 450 ms | 23480 KB |
test_37.txt | AC | 457 ms | 23604 KB |
test_38.txt | AC | 446 ms | 23480 KB |
test_39.txt | AC | 456 ms | 23596 KB |
test_40.txt | AC | 514 ms | 23476 KB |
test_41.txt | AC | 430 ms | 23464 KB |
test_42.txt | AC | 439 ms | 23464 KB |
test_43.txt | AC | 442 ms | 23348 KB |
test_44.txt | AC | 447 ms | 23480 KB |
test_45.txt | AC | 441 ms | 23476 KB |
test_46.txt | AC | 443 ms | 23476 KB |
test_47.txt | AC | 434 ms | 23572 KB |
test_48.txt | AC | 455 ms | 23348 KB |
test_49.txt | AC | 456 ms | 23476 KB |
test_50.txt | AC | 455 ms | 23444 KB |
test_51.txt | AC | 460 ms | 23472 KB |
test_52.txt | AC | 459 ms | 23472 KB |
test_53.txt | AC | 460 ms | 23604 KB |
test_54.txt | AC | 454 ms | 23476 KB |
test_55.txt | AC | 457 ms | 23608 KB |
test_56.txt | AC | 444 ms | 23480 KB |
test_57.txt | AC | 447 ms | 23604 KB |
test_58.txt | AC | 478 ms | 23348 KB |