結果
問題 | No.239 にゃんぱすー |
ユーザー |
![]() |
提出日時 | 2017-09-24 22:37:48 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 34 ms / 2,000 ms |
コード長 | 475 bytes |
コンパイル時間 | 266 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,520 KB |
最終ジャッジ日時 | 2024-11-14 07:33:13 |
合計ジャッジ時間 | 2,464 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 33 |
ソースコード
ans=[] def ILLINRows(N): return [input().split() for i in range(N)] def transpose(matrix): if matrix ==[]: return [] if matrix[0] ==1: return list(map(list, zip(matrix))) else: return list(map(list, zip(*matrix))) n = int(input()) twoArray=ILLINRows(n) twoArray=transpose(twoArray) for i in enumerate(twoArray): if i[1].count("nyanpass")==n-1: ans.append(i[0]+1) if len(ans)!=1: print(-1) else: print(ans[0])