結果

問題 No.239 にゃんぱすー
ユーザー YU Hirose
提出日時 2024-05-30 23:43:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 53 ms / 2,000 ms
コード長 319 bytes
コンパイル時間 224 ms
コンパイル使用メモリ 82,508 KB
実行使用メモリ 61,056 KB
最終ジャッジ日時 2024-12-20 21:43:14
合計ジャッジ時間 4,003 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = []
for _ in range(n):
    a_ = list(input().split())
    a.append(a_)

cnt = [True] * n
for i in range(n):
    for j in range(n):
        if i == j:
            continue
        if a[i][j] != "nyanpass":
            cnt[j] = False

if sum(cnt) == 1:
    print(cnt.index(True)+1)
else:
    print(-1)
0