AtCoder Beginner Contest 001

Submission #119828

Source codeソースコード

<?php
# 整数の入力
fscanf(STDIN, "%d %d", $a, $b);
#fscanf(STDIN, "%d", $b);
# スペース区切りの整数の入力
# fscanf(STDIN, "%d %d", $b, $c);
# 文字列の入力
# fscanf(STDIN, "%s", $s);
# 出力
# echo ($a+$b+$c)." ".$s."\n";

$a = $a / 10;
$ret = 0;
if ($a == 0) {
    $ret = 'C';
} elseif (11.25 <= $a && $a < 33.75) {
    $ret = 'NNE';
} elseif (33.75 <= $a && $a < 56.25) {
    $ret = 'NE';
} elseif (56.25 <= $a && $a < 78.75) {
    $ret = 'ENE';
} elseif (168.75 <= $a && $a < 191.25) {
    $ret = 'S';
} elseif (191.25 <= $a && $a < 213.75) {
    $ret = 'SSW';
} elseif (213.75 <= $a && $a < 236.25) {
    $ret = 'SW';
} elseif (236.25 <= $a && $a < 258.75) {
    $ret = 'WSW';
} elseif (258.75 <= $a && $a < 281.25) {
    $ret = 'W';
} elseif (281.25 <= $a && $a < 303.75) {
    $ret = 'WNW';
} elseif (303.75 <= $a && $a < 326.25) {
    $ret = 'NW';
} elseif (326.25 <= $a && $a < 348.75) {
    $ret = 'NNW';
} else {
    $ret = 'N';
}

$b = $b / 60;
if (0 <= $b && $b <= 0.2) {
    $w = 0;
} elseif (0.3 <= $b && $b <= 1.5) {
    $w = 1;
} elseif (1.6 <= $b && $b <= 3.3) {
    $w = 2;
} elseif (3.4 <= $b && $b <= 5.4) {
    $w = 3;
} elseif (5.5 <= $b && $b <= 7.9) {
    $w = 4;
} elseif (8.0 <= $b && $b <= 10.7) {
    $w = 5;
} elseif (10.8 <= $b && $b <= 13.8) {
    $w = 6;
} elseif (13.9 <= $b && $b <= 17.1) {
    $w = 7;
} elseif (17.2 <= $b && $b <= 20.7) {
    $w = 8;
} elseif (20.8 <= $b && $b <= 24.4) {
    $w = 9;
} elseif (24.5 <= $b && $b <= 28.4) {
    $w = 10;
} elseif (28.5 <= $b && $b <= 32.6) {
    $w = 11;
} elseif (32.7 <= $b) {
    $w = 12;
}
echo $ret .  ' ' . $w . "\n";
?>

Submission

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

Test case

Set

Set name Score得点 / Max score Cases
all 0 / 100 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

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
00_sample_01.txt AC 60 ms 3836 KB
00_sample_02.txt WA
00_sample_03.txt WA
00_sample_04.txt WA
00_sample_05.txt WA
00_sample_06.txt WA
00_sample_07.txt WA
00_sample_08.txt WA
test_01.txt WA
test_02.txt WA
test_03.txt WA
test_04.txt WA
test_05.txt WA
test_06.txt WA
test_07.txt WA
test_08.txt WA
test_09.txt WA
test_10.txt WA
test_11.txt WA
test_12.txt WA
test_13.txt WA
test_14.txt WA
test_15.txt WA
test_16.txt WA
test_17.txt WA
test_18.txt WA
test_19.txt WA
test_20.txt WA
test_21.txt WA
test_22.txt WA
test_23.txt WA
test_24.txt WA
test_25.txt WA
test_26.txt AC 49 ms 3832 KB
test_27.txt AC 50 ms 3832 KB
test_28.txt AC 47 ms 3828 KB
test_29.txt AC 46 ms 3884 KB
test_30.txt AC 50 ms 3896 KB
test_31.txt WA
test_32.txt WA
test_33.txt WA
test_34.txt WA
test_35.txt AC 47 ms 3904 KB
test_36.txt AC 50 ms 3864 KB
test_37.txt AC 48 ms 3828 KB
test_38.txt AC 49 ms 3888 KB
test_39.txt AC 49 ms 3892 KB
test_40.txt AC 49 ms 3824 KB
test_41.txt AC 48 ms 3872 KB
test_42.txt AC 48 ms 3872 KB
test_43.txt AC 48 ms 3872 KB
test_44.txt AC 50 ms 3896 KB
test_45.txt AC 49 ms 3828 KB
test_46.txt WA
test_47.txt WA
test_48.txt WA
test_49.txt WA
test_50.txt AC 50 ms 3864 KB
test_51.txt AC 49 ms 3840 KB
test_52.txt AC 49 ms 3836 KB
test_53.txt AC 49 ms 3900 KB
test_54.txt AC 48 ms 3868 KB
test_55.txt AC 51 ms 3840 KB
test_56.txt AC 50 ms 3828 KB
test_57.txt AC 48 ms 3836 KB
test_58.txt AC 49 ms 3832 KB