結果

問題 No.138 化石のバージョン
ユーザー AAAR15AAAR15
提出日時 2015-06-22 16:29:08
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 500 bytes
コンパイル時間 988 ms
コンパイル使用メモリ 18,588 KB
実行使用メモリ 19,060 KB
最終ジャッジ日時 2023-09-21 23:22:20
合計ジャッジ時間 2,088 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 16 ms
18,816 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 16 ms
18,820 KB
testcase_07 AC 15 ms
18,980 KB
testcase_08 AC 16 ms
18,808 KB
testcase_09 AC 16 ms
18,956 KB
testcase_10 AC 16 ms
18,944 KB
testcase_11 AC 16 ms
18,896 KB
testcase_12 AC 16 ms
19,052 KB
testcase_13 AC 16 ms
19,060 KB
testcase_14 AC 16 ms
19,020 KB
testcase_15 AC 17 ms
18,816 KB
testcase_16 AC 16 ms
18,980 KB
testcase_17 AC 16 ms
19,044 KB
testcase_18 AC 16 ms
18,976 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 16 ms
18,940 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 16 ms
18,956 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 16 ms
19,028 KB
testcase_34 AC 15 ms
18,872 KB
testcase_35 AC 16 ms
19,060 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$hantei = fgets(STDIN);
$target = fgets(STDIN);
$str = explode(".", $hantei);
$major = sprintf("[%-03s]\n", $str[0]);
$minor = sprintf("[%-03s]\n", $str[1]);
$patch = sprintf("[%-03s]\n", $str[2]);
$str1 = explode(".", $target);
$major1 = sprintf("[%-03s]\n", $str1[0]);
$minor1 = sprintf("[%-03s]\n", $str1[1]);
$patch1 = sprintf("[%-03s]\n", $str1[2]);
$hantei = $major . $minor . $patch;
$target = $major1 . $minor1 . $patch1;
if ($hantei - $target < 0) {
	echo 'NO';
} else {
	echo 'YES';
}
0