結果

問題 No.582 キャンディー・ボックス3
ユーザー papinianuspapinianus
提出日時 2017-11-14 16:49:53
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 394 bytes
コンパイル時間 103 ms
コンパイル使用メモリ 12,012 KB
実行使用メモリ 12,396 KB
最終ジャッジ日時 2023-08-16 13:06:49
合計ジャッジ時間 1,234 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
12,208 KB
testcase_01 AC 7 ms
12,216 KB
testcase_02 AC 6 ms
12,280 KB
testcase_03 AC 7 ms
12,336 KB
testcase_04 AC 7 ms
12,284 KB
testcase_05 AC 7 ms
12,208 KB
testcase_06 AC 7 ms
12,292 KB
testcase_07 AC 7 ms
12,292 KB
testcase_08 AC 7 ms
12,220 KB
testcase_09 AC 7 ms
12,264 KB
testcase_10 AC 7 ms
12,272 KB
testcase_11 AC 7 ms
12,280 KB
testcase_12 AC 7 ms
12,276 KB
testcase_13 AC 6 ms
12,276 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 7 ms
12,248 KB
testcase_17 AC 8 ms
12,324 KB
testcase_18 AC 7 ms
12,272 KB
testcase_19 AC 7 ms
12,280 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$devnull = trim(fgets(STDIN));
$boxes = array_count_values(explode(" ", trim(fgets(STDIN))));
if(isset($boxes[0])) { unset($boxes[0]); }

if(count($boxes) % 2 === 1) {
    $aVincible = isset($boxes[1]) && (count($boxes) === 1) ;
} else {
    $aVincible = isset($boxes[1]) && isset($boxes["2"]) &&  (count($boxes) === 2)  && $boxes["2"] === 1;
}

echo $aVincible ? "A" : "B";
echo PHP_EOL;
0