結果
| 問題 | No.264 じゃんけん |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-06-13 15:42:07 |
| 言語 | PHP (8.5.9) |
| 結果 |
AC
不安定
|
| 実行時間 | 33 ms / 5,000 ms |
| + 49µs | |
| コード長 | 870 bytes |
| 記録 | |
| コンパイル時間 | 37 ms |
| コンパイル使用メモリ | 36,876 KB |
| 実行使用メモリ | 37,516 KB |
| 最終ジャッジ日時 | 2026-09-03 08:39:53 |
| 合計ジャッジ時間 | 1,377 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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");