結果

問題 No.239 にゃんぱすー
ユーザー R N
提出日時 2020-10-11 09:28:01
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 432 bytes
コンパイル時間 241 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,520 KB
最終ジャッジ日時 2024-07-20 17:07:35
合計ジャッジ時間 2,551 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 31 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding=utf-8:
import collections

n = int(input())
persons = dict([(i, 0) for i in range(n)])
greeting = list()

for i in range(n):
    greeting.append(list(map(str, input().split())))

for j in range(n):
    for k in range(n):
        if greeting[j][k] == "nyanpass":
            persons[k] += 1

max_k = [k for k, v in persons.items() if v == max(persons.values())]

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