結果

問題 No.24 数当てゲーム
ユーザー tetsukicktetsukick
提出日時 2017-04-26 18:37:03
言語 PHP
(8.3.4)
結果
AC  
実行時間 8 ms / 5,000 ms
コード長 489 bytes
コンパイル時間 474 ms
コンパイル使用メモリ 11,912 KB
実行使用メモリ 12,080 KB
最終ジャッジ日時 2023-10-11 13:59:46
合計ジャッジ時間 1,087 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
12,068 KB
testcase_01 AC 7 ms
11,972 KB
testcase_02 AC 8 ms
12,044 KB
testcase_03 AC 7 ms
12,044 KB
testcase_04 AC 7 ms
12,072 KB
testcase_05 AC 7 ms
12,080 KB
testcase_06 AC 7 ms
12,072 KB
testcase_07 AC 8 ms
12,052 KB
testcase_08 AC 8 ms
12,024 KB
testcase_09 AC 7 ms
12,000 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$turn = trim(fgets(STDIN));
$try = array();
for ($i=0;$i<$turn;$i++) {
    $try[] = explode(" ",trim(fgets(STDIN)));
}
// var_dump($try);

$point = array_fill(0, 10, 0);

for ($k=0;$k<$turn;$k++) {
    if($try[$k][4] == 'YES') {
        for($j=0;$j<4;$j++){
            $point[$try[$k][$j]]++; 
        }
    }else {
        for($j=0;$j<4;$j++){
            $point[$try[$k][$j]]--; 
        }
    }
}
for($l=0;$l<10;$l++){
    if ($point[$l] == max($point)){
        echo $l;
    }
}
0