結果

問題 No.239 にゃんぱすー
ユーザー 🍡yurahuna🍡yurahuna
提出日時 2016-01-21 03:55:08
言語 Python2
(2.7.18)
結果
AC  
実行時間 13 ms / 2,000 ms
コード長 438 bytes
コンパイル時間 58 ms
コンパイル使用メモリ 7,104 KB
実行使用メモリ 7,220 KB
最終ジャッジ日時 2023-10-21 13:39:57
合計ジャッジ時間 1,535 ms
ジャッジサーバーID
(参考情報)
judge12 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 9 ms
6,500 KB
testcase_01 AC 11 ms
6,500 KB
testcase_02 AC 9 ms
6,500 KB
testcase_03 AC 9 ms
6,500 KB
testcase_04 AC 11 ms
6,500 KB
testcase_05 AC 12 ms
6,500 KB
testcase_06 AC 11 ms
6,500 KB
testcase_07 AC 11 ms
6,500 KB
testcase_08 AC 10 ms
6,504 KB
testcase_09 AC 10 ms
6,516 KB
testcase_10 AC 9 ms
6,524 KB
testcase_11 AC 9 ms
6,536 KB
testcase_12 AC 10 ms
6,568 KB
testcase_13 AC 9 ms
6,592 KB
testcase_14 AC 9 ms
6,624 KB
testcase_15 AC 9 ms
6,636 KB
testcase_16 AC 10 ms
6,644 KB
testcase_17 AC 10 ms
6,664 KB
testcase_18 AC 10 ms
6,672 KB
testcase_19 AC 11 ms
6,800 KB
testcase_20 AC 10 ms
6,800 KB
testcase_21 AC 11 ms
6,800 KB
testcase_22 AC 11 ms
6,800 KB
testcase_23 AC 11 ms
6,800 KB
testcase_24 AC 11 ms
7,064 KB
testcase_25 AC 12 ms
7,064 KB
testcase_26 AC 12 ms
7,064 KB
testcase_27 AC 10 ms
6,504 KB
testcase_28 AC 10 ms
6,524 KB
testcase_29 AC 10 ms
6,568 KB
testcase_30 AC 9 ms
6,624 KB
testcase_31 AC 10 ms
6,648 KB
testcase_32 AC 9 ms
6,672 KB
testcase_33 AC 10 ms
6,800 KB
testcase_34 AC 10 ms
6,800 KB
testcase_35 AC 10 ms
7,064 KB
testcase_36 AC 13 ms
7,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
A = []
for i in xrange(N):
    A.append(raw_input().split())
cnt = 0
ans = 0
for i in xrange(N):
    for j in xrange(N):
        if i != j and A[i][j] != "nyanpass":
            break
    else:
        ans = i+1
        cnt += 1
for j in xrange(N):
    for i in xrange(N):
        if i != j and A[i][j] != "nyanpass":
            break
    else:
        ans = j+1
        cnt += 1
if cnt == 1:
    print ans
else:
    print -1
0