結果

問題 No.239 にゃんぱすー
ユーザー ABKZ
提出日時 2021-07-10 20:36:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 48 ms / 2,000 ms
コード長 296 bytes
コンパイル時間 236 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 59,904 KB
最終ジャッジ日時 2024-07-02 02:50:35
合計ジャッジ時間 3,020 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = [input().split() for _ in range(N)]

rentyonpoi = []
for i in range(N):
    gr = [a[i] for a in A]
    nyanpass_cnt = gr.count("nyanpass")
    if nyanpass_cnt == N - 1:
        rentyonpoi.append(i)

if (len(rentyonpoi) == 1):
    print(rentyonpoi[0] + 1)
else:
    print(-1)
0