結果

問題 No.239 にゃんぱすー
ユーザー FVRChan
提出日時 2017-12-05 22:15:16
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 382 bytes
コンパイル時間 253 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,520 KB
最終ジャッジ日時 2024-11-28 17:36:37
合計ジャッジ時間 3,112 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
m=[input().split(" ") for i in range(n)]
def f(w):
    for i in range(n):
        if m[i][w]=="-":
            continue
        if m[i][w]!="nyanpass":
            return False
    return True
#
g,num=False,-1
for i in range(n):
    if f(i)==True and g==False:
        num=i+1
        g=True
    elif f(i)==True and g==True:
        num=-1
        break
#
print(num)
0