結果
| 問題 | No.264 じゃんけん |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-06-13 15:42:07 |
| 言語 | PHP (8.5.4) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 5,000 ms |
| コード長 | 870 bytes |
| 記録 | |
| コンパイル時間 | 84 ms |
| コンパイル使用メモリ | 36,916 KB |
| 実行使用メモリ | 36,908 KB |
| 最終ジャッジ日時 | 2026-04-11 20:13:04 |
| 合計ジャッジ時間 | 1,109 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
//1行目を読み込む
$line1 = trim(fgets(STDIN));
list($mine, $his) = explode(" ", $line1);
$result;
if ($mine === '0') {
if ($his === '0') {
$result = "Drew";
} else if ($his === '1') {
$result = "Won";
} else if ($his === '2') {
$result = "Lost";
} else {
$result = "Drew";
}
} else if ($mine === '1') {
if ($his === '0') {
$result = "Lost";
} else if ($his === '1') {
$result = "Drew";
} else if ($his === '2') {
$result = "Won";
} else {
$result = "Drew";
}
} else if ($mine === '2') {
if ($his === '0') {
$result = "Won";
} else if ($his === '1') {
$result = "Lost";
} else if ($his === '2') {
$result = "Drew";
} else {
$result = "Drew";
}
} else {
$result = "Drew";
}
printf("{$result} \n");