結果

問題 No.706 多眼生物の調査
ユーザー _KingdomOfMoray_KingdomOfMoray
提出日時 2020-01-03 09:49:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 362 bytes
コンパイル時間 141 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,392 KB
最終ジャッジ日時 2024-05-02 07:05:08
合計ジャッジ時間 910 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
10,752 KB
testcase_01 AC 33 ms
10,752 KB
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 AC 31 ms
10,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections

n = int(input())
s_list = [input() for i in range(n)]

max_freq = -1
max_key = -1
s_clc = collections.Counter(s_list)

for key in s_clc.keys():
    if s_clc[key] > max_freq:
        max_freq = s_clc[key]
        max_key = len(key)
    elif s_clc[key] == max_freq and len(key) > len(max_key):
        max_key = len(key)
    
print(max_key - 2)
0