結果

問題 No.138 化石のバージョン
ユーザー mondomondo
提出日時 2019-07-30 12:07:00
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 486 bytes
コンパイル時間 431 ms
コンパイル使用メモリ 11,924 KB
実行使用メモリ 12,332 KB
最終ジャッジ日時 2023-09-17 05:03:47
合計ジャッジ時間 2,051 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
12,220 KB
testcase_01 AC 8 ms
12,276 KB
testcase_02 AC 7 ms
12,264 KB
testcase_03 WA -
testcase_04 AC 7 ms
12,264 KB
testcase_05 AC 7 ms
12,136 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 7 ms
12,220 KB
testcase_20 AC 7 ms
12,188 KB
testcase_21 WA -
testcase_22 AC 7 ms
12,128 KB
testcase_23 AC 7 ms
12,292 KB
testcase_24 AC 7 ms
12,108 KB
testcase_25 AC 7 ms
12,276 KB
testcase_26 WA -
testcase_27 AC 7 ms
12,244 KB
testcase_28 AC 7 ms
12,148 KB
testcase_29 AC 8 ms
12,280 KB
testcase_30 AC 7 ms
12,228 KB
testcase_31 AC 8 ms
12,152 KB
testcase_32 AC 7 ms
12,300 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";
    } elseif ($ver1[1] == $ver2[1] && $ver1[2] < $ver2[2]) {
        echo "NO";
    } elseif ($ver1[1] < $ver2[1]) {
        echo "NO";
    }
} elseif ($ver1[0] < $ver2[0]) {
    echo "NO";
}
0