結果

問題 No.138 化石のバージョン
ユーザー mondomondo
提出日時 2019-07-30 11:55:23
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 356 bytes
コンパイル時間 339 ms
コンパイル使用メモリ 11,908 KB
実行使用メモリ 12,300 KB
最終ジャッジ日時 2023-09-17 04:46:28
合計ジャッジ時間 1,575 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
12,240 KB
testcase_01 AC 5 ms
12,188 KB
testcase_02 AC 6 ms
12,244 KB
testcase_03 WA -
testcase_04 AC 6 ms
12,200 KB
testcase_05 AC 5 ms
12,284 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 5 ms
12,276 KB
testcase_20 AC 5 ms
12,236 KB
testcase_21 WA -
testcase_22 AC 6 ms
12,240 KB
testcase_23 AC 6 ms
12,204 KB
testcase_24 AC 6 ms
12,240 KB
testcase_25 AC 5 ms
12,224 KB
testcase_26 WA -
testcase_27 AC 6 ms
12,224 KB
testcase_28 AC 5 ms
12,240 KB
testcase_29 AC 6 ms
12,196 KB
testcase_30 AC 6 ms
12,244 KB
testcase_31 AC 6 ms
12,184 KB
testcase_32 AC 7 ms
12,296 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$ver1 = explode(".", trim(fgets(STDIN)));
$ver2 = explode(".", trim(fgets(STDIN)));
if ($ver1[0] > $ver2[0]) {
    echo "OK";
} elseif ($ver1[0] == $ver2[0]){
    if ($ver1[1] > $ver2[1]) {
        echo "OK";
    }elseif ($ver1[1] == $ver2[1] && $ver1[2] > $ver2[2]){
        echo "OK";
    } else {
        echo "NO";
    }
} else {
    echo "NO";
}
0