結果

問題 No.239 にゃんぱすー
ユーザー takeya_okinotakeya_okino
提出日時 2017-07-14 20:16:37
言語 PHP
(8.3.4)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 402 bytes
コンパイル時間 123 ms
コンパイル使用メモリ 30,780 KB
実行使用メモリ 31,556 KB
最終ジャッジ日時 2024-04-16 19:52:33
合計ジャッジ時間 2,760 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
31,296 KB
testcase_01 AC 42 ms
31,016 KB
testcase_02 AC 41 ms
31,296 KB
testcase_03 AC 41 ms
31,244 KB
testcase_04 AC 41 ms
31,264 KB
testcase_05 AC 42 ms
30,916 KB
testcase_06 AC 41 ms
31,500 KB
testcase_07 AC 41 ms
31,184 KB
testcase_08 AC 42 ms
31,132 KB
testcase_09 AC 41 ms
31,412 KB
testcase_10 AC 41 ms
31,452 KB
testcase_11 AC 41 ms
31,332 KB
testcase_12 AC 41 ms
31,180 KB
testcase_13 AC 41 ms
31,468 KB
testcase_14 AC 41 ms
31,112 KB
testcase_15 AC 41 ms
31,392 KB
testcase_16 AC 41 ms
31,276 KB
testcase_17 AC 42 ms
31,408 KB
testcase_18 AC 42 ms
31,192 KB
testcase_19 AC 43 ms
31,268 KB
testcase_20 AC 42 ms
31,244 KB
testcase_21 AC 42 ms
31,212 KB
testcase_22 AC 42 ms
31,508 KB
testcase_23 AC 41 ms
31,244 KB
testcase_24 AC 42 ms
31,248 KB
testcase_25 AC 43 ms
31,248 KB
testcase_26 AC 42 ms
31,372 KB
testcase_27 AC 42 ms
31,252 KB
testcase_28 AC 41 ms
31,556 KB
testcase_29 AC 42 ms
31,288 KB
testcase_30 AC 42 ms
31,184 KB
testcase_31 AC 42 ms
31,184 KB
testcase_32 AC 42 ms
31,012 KB
testcase_33 AC 42 ms
31,120 KB
testcase_34 AC 41 ms
31,248 KB
testcase_35 AC 42 ms
31,376 KB
testcase_36 AC 43 ms
31,528 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$N = trim(fgets(STDIN));
$A = array();
for($i = 0; $i < $N; $i++) {
  $array = explode(" ", trim(fgets(STDIN)));
  $A[$i] = $array;
}
$count = 0;
$renchon = 0;
for($j = 0; $j < $N; $j++) {
  $t = 0;
  for($i = 0; $i < $N; $i++) {
    if($A[$i][$j] == 'nyanpass') $t++;
  }
  if($t == $N - 1) {
    $count++;
    $renchon = $j + 1;
  }
}
$ans = -1;
if($count == 1) $ans = $renchon;
print($ans);
?>
0