結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
AAAR15
|
| 提出日時 | 2015-06-22 16:33:06 |
| 言語 | PHP (843.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 476 bytes |
| コンパイル時間 | 140 ms |
| コンパイル使用メモリ | 32,272 KB |
| 実行使用メモリ | 32,916 KB |
| 最終ジャッジ日時 | 2024-07-07 16:21:40 |
| 合計ジャッジ時間 | 2,961 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 13 WA * 20 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
$hantei = fgets(STDIN);
$target = fgets(STDIN);
$str = explode(".", $hantei);
$major = sprintf("%-03s", $str[0]);
$minor = sprintf("%-03s", $str[1]);
$patch = sprintf("%-03s", $str[2]);
$str1 = explode(".", $target);
$major1 = sprintf("%-03s", $str1[0]);
$minor1 = sprintf("%-03s", $str1[1]);
$patch1 = sprintf("%-03s", $str1[2]);
$hantei = $major . $minor . $patch;
$target = $major1 . $minor1 . $patch1;
if ($hantei - $target < 0) {
echo 'NO';
} else {
echo 'YES';
}
AAAR15