結果

問題 No.239 にゃんぱすー
ユーザー _KingdomOfMoray_KingdomOfMoray
提出日時 2019-12-03 22:07:03
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 158 ms / 2,000 ms
コード長 436 bytes
コンパイル時間 242 ms
コンパイル使用メモリ 10,928 KB
実行使用メモリ 31,392 KB
最終ジャッジ日時 2023-08-18 15:02:22
合計ジャッジ時間 9,454 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 141 ms
29,652 KB
testcase_01 AC 144 ms
29,700 KB
testcase_02 AC 144 ms
29,816 KB
testcase_03 AC 145 ms
29,556 KB
testcase_04 AC 144 ms
29,632 KB
testcase_05 AC 142 ms
29,652 KB
testcase_06 AC 142 ms
29,500 KB
testcase_07 AC 146 ms
29,588 KB
testcase_08 AC 142 ms
29,660 KB
testcase_09 AC 139 ms
29,540 KB
testcase_10 AC 142 ms
29,764 KB
testcase_11 AC 141 ms
29,608 KB
testcase_12 AC 142 ms
29,848 KB
testcase_13 AC 141 ms
29,920 KB
testcase_14 AC 142 ms
29,876 KB
testcase_15 AC 144 ms
30,016 KB
testcase_16 AC 145 ms
30,124 KB
testcase_17 AC 146 ms
30,000 KB
testcase_18 AC 146 ms
29,964 KB
testcase_19 AC 152 ms
30,268 KB
testcase_20 AC 148 ms
30,388 KB
testcase_21 AC 148 ms
30,676 KB
testcase_22 AC 151 ms
30,628 KB
testcase_23 AC 149 ms
30,892 KB
testcase_24 AC 152 ms
30,932 KB
testcase_25 AC 152 ms
31,280 KB
testcase_26 AC 153 ms
31,392 KB
testcase_27 AC 141 ms
29,636 KB
testcase_28 AC 144 ms
29,760 KB
testcase_29 AC 145 ms
29,652 KB
testcase_30 AC 145 ms
29,832 KB
testcase_31 AC 149 ms
30,100 KB
testcase_32 AC 147 ms
30,008 KB
testcase_33 AC 151 ms
30,368 KB
testcase_34 AC 153 ms
30,704 KB
testcase_35 AC 156 ms
30,744 KB
testcase_36 AC 158 ms
31,232 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np
import collections

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

arr_a = np.array(a)

renindex = []

for i in range(arr_a.shape[0]):
    for j in range(arr_a.shape[1]):
        if arr_a[i][j] == 'nyanpass':
            renindex.append(j)
            
cl = collections.Counter(renindex)

renkeys = [k for k, v in cl.items() if v == n-1]

if len(renkeys) == 1:
    print(renkeys[0] + 1)
else:
    print(-1)
0