結果

問題 No.239 にゃんぱすー
ユーザー knt3110knt3110
提出日時 2018-05-19 11:08:25
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 21 ms / 2,000 ms
コード長 342 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 10,952 KB
実行使用メモリ 8,940 KB
最終ジャッジ日時 2023-09-10 23:39:57
合計ジャッジ時間 2,100 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,688 KB
testcase_01 AC 15 ms
7,688 KB
testcase_02 AC 15 ms
7,780 KB
testcase_03 AC 15 ms
7,832 KB
testcase_04 AC 15 ms
7,688 KB
testcase_05 AC 15 ms
7,832 KB
testcase_06 AC 16 ms
7,920 KB
testcase_07 AC 15 ms
7,776 KB
testcase_08 AC 15 ms
7,776 KB
testcase_09 AC 15 ms
7,764 KB
testcase_10 AC 16 ms
7,760 KB
testcase_11 AC 16 ms
7,776 KB
testcase_12 AC 15 ms
7,832 KB
testcase_13 AC 16 ms
8,172 KB
testcase_14 AC 16 ms
8,284 KB
testcase_15 AC 17 ms
8,200 KB
testcase_16 AC 16 ms
8,352 KB
testcase_17 AC 17 ms
8,216 KB
testcase_18 AC 17 ms
8,400 KB
testcase_19 AC 18 ms
8,396 KB
testcase_20 AC 18 ms
8,476 KB
testcase_21 AC 18 ms
8,488 KB
testcase_22 AC 19 ms
8,408 KB
testcase_23 AC 19 ms
8,712 KB
testcase_24 AC 19 ms
8,696 KB
testcase_25 AC 20 ms
8,824 KB
testcase_26 AC 21 ms
8,684 KB
testcase_27 AC 16 ms
7,900 KB
testcase_28 AC 16 ms
7,776 KB
testcase_29 AC 17 ms
7,772 KB
testcase_30 AC 16 ms
8,404 KB
testcase_31 AC 17 ms
8,200 KB
testcase_32 AC 18 ms
8,196 KB
testcase_33 AC 18 ms
8,572 KB
testcase_34 AC 19 ms
8,512 KB
testcase_35 AC 20 ms
8,748 KB
testcase_36 AC 20 ms
8,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=[[str(i) for i in input().split()] for i in range(n)]

count=[0 for i in range(n)]
for i in range(n):
    for j in range(n):
        if i!=j and a[i][j]!='nyanpass':
            count[j]+=1
judge=0
ans=-1
for i in range(n):
    if count[i]==0:
        judge+=1
        ans=i
if judge==1:
    print(ans+1)
else:
    print(-1)
0