結果

問題 No.24 数当てゲーム
ユーザー sharkshark
提出日時 2017-05-16 02:03:03
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 403 bytes
コンパイル時間 1,189 ms
コンパイル使用メモリ 18,428 KB
実行使用メモリ 19,048 KB
最終ジャッジ日時 2023-10-14 13:28:47
合計ジャッジ時間 2,123 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$num = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
const yesno = 4;
$set = array();
$count = trim(fgets(STDIN));
for ($i=0;$i<$count;$i++) {
    $sets[$i] = explode(" ",trim(fgets(STDIN)));
    if ($sets[$i][yesno] === "YES") {
        $num = array_intersect($num,$sets[$i]);
    } else {
        $num = array_diff($num,$sets[$i]);
    }
    var_dump($num);
}
foreach($num as $k =>$v){
    echo "$k\n";
}
0