結果

問題 No.239 にゃんぱすー
ユーザー punyfixpunyfix
提出日時 2017-09-19 19:49:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 466 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-25 18:15:34
合計ジャッジ時間 2,103 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,880 KB
testcase_01 AC 27 ms
10,880 KB
testcase_02 WA -
testcase_03 AC 27 ms
10,880 KB
testcase_04 AC 29 ms
10,880 KB
testcase_05 AC 29 ms
10,752 KB
testcase_06 AC 28 ms
10,880 KB
testcase_07 AC 26 ms
10,880 KB
testcase_08 AC 27 ms
10,880 KB
testcase_09 RE -
testcase_10 AC 26 ms
10,880 KB
testcase_11 WA -
testcase_12 RE -
testcase_13 AC 26 ms
10,880 KB
testcase_14 RE -
testcase_15 RE -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 27 ms
10,880 KB
testcase_21 WA -
testcase_22 AC 27 ms
10,880 KB
testcase_23 AC 27 ms
10,880 KB
testcase_24 AC 29 ms
10,880 KB
testcase_25 RE -
testcase_26 WA -
testcase_27 AC 27 ms
10,880 KB
testcase_28 AC 27 ms
10,880 KB
testcase_29 RE -
testcase_30 AC 27 ms
10,880 KB
testcase_31 AC 27 ms
10,880 KB
testcase_32 RE -
testcase_33 WA -
testcase_34 AC 27 ms
10,880 KB
testcase_35 RE -
testcase_36 AC 27 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

N = int(input())
A = [0]*5
cnt = 0

for i in range(N):
    A[i]=input().split()
    if A[i].count("nyanpass") >= 2:
        print(-1)
        sys.exit()
    elif A[i].count("nyanpass") == 0:
        cnt += 1
        if cnt >= 2:
            print(-1)
            sys.exit()

if A[0].count("nyanpass") > 0:
    if A[0].index("nyanpass")+1 == N:
        print("1")
    else:
        print(A[0].index("nyanpass")+1)
else:
    print(A[1].index("nyanpass")+1)
0