結果

問題 No.239 にゃんぱすー
ユーザー papinianuspapinianus
提出日時 2016-07-26 17:21:04
言語 PHP
(8.3.4)
結果
AC  
実行時間 37 ms / 2,000 ms
コード長 383 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 30,984 KB
実行使用メモリ 31,008 KB
最終ジャッジ日時 2024-04-24 09:40:48
合計ジャッジ時間 2,358 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
30,836 KB
testcase_01 AC 37 ms
30,784 KB
testcase_02 AC 37 ms
30,684 KB
testcase_03 AC 35 ms
30,544 KB
testcase_04 AC 36 ms
30,748 KB
testcase_05 AC 35 ms
30,520 KB
testcase_06 AC 34 ms
30,976 KB
testcase_07 AC 34 ms
30,956 KB
testcase_08 AC 36 ms
30,684 KB
testcase_09 AC 35 ms
30,728 KB
testcase_10 AC 35 ms
30,524 KB
testcase_11 AC 37 ms
30,740 KB
testcase_12 AC 36 ms
30,628 KB
testcase_13 AC 36 ms
30,860 KB
testcase_14 AC 35 ms
30,576 KB
testcase_15 AC 35 ms
30,636 KB
testcase_16 AC 35 ms
30,612 KB
testcase_17 AC 35 ms
30,756 KB
testcase_18 AC 36 ms
30,504 KB
testcase_19 AC 35 ms
30,788 KB
testcase_20 AC 35 ms
30,676 KB
testcase_21 AC 36 ms
30,548 KB
testcase_22 AC 35 ms
30,816 KB
testcase_23 AC 35 ms
30,556 KB
testcase_24 AC 36 ms
30,516 KB
testcase_25 AC 35 ms
30,700 KB
testcase_26 AC 35 ms
30,624 KB
testcase_27 AC 35 ms
30,776 KB
testcase_28 AC 35 ms
30,728 KB
testcase_29 AC 34 ms
30,660 KB
testcase_30 AC 33 ms
30,908 KB
testcase_31 AC 34 ms
30,920 KB
testcase_32 AC 34 ms
30,612 KB
testcase_33 AC 33 ms
30,892 KB
testcase_34 AC 33 ms
31,008 KB
testcase_35 AC 34 ms
30,860 KB
testcase_36 AC 35 ms
30,668 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$n = trim(fgets(STDIN));
$flgs = array_fill(0, $n, 1);
for($i = 0; $i < $n; $i++) {
    $row = explode(" ", trim(fgets(STDIN)));
    foreach($row as $key=>$value) {
        if($value != '-' && $value != 'nyanpass') {
            $flgs[$key] = 0;
        }
    }
}
if(count(array_keys($flgs, 1)) == 1) {
    echo (array_search(1, $flgs)+1);
} else {
    echo -1;
}
echo PHP_EOL;
0