結果
問題 |
No.239 にゃんぱすー
|
ユーザー |
|
提出日時 | 2019-07-31 16:07:36 |
言語 | PHP (843.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 494 bytes |
コンパイル時間 | 72 ms |
コンパイル使用メモリ | 31,024 KB |
実行使用メモリ | 31,504 KB |
最終ジャッジ日時 | 2024-07-05 06:29:16 |
合計ジャッジ時間 | 2,581 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 21 WA * 12 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php $num=trim(fgets(STDIN)); $inputArray; $ans=null; $cnt=0; for($i=1;$i<=$num;$i++){ $input=explode(" ",trim(fgets(STDIN))); $inputArray[$i-1]=$input; } for($i=0;$i<=$num-1;$i++){ if($cnt!=0&&$cnt!=$num-1){ $ans=null; break; } for($x=0;$x<=$num-1;$x++){ if($inputArray[$x][$i]=="nyanpass"){ $cnt++; if($cnt==$num-1){ $ans=$i+1; break; } } } if(!(is_null($ans))){ break; } } if(is_null($ans)){ $ans=-1; } echo $ans;