結果

問題 No.706 多眼生物の調査
ユーザー ohanaohana
提出日時 2023-10-27 16:16:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 51 ms / 2,000 ms
コード長 231 bytes
コンパイル時間 367 ms
コンパイル使用メモリ 81,800 KB
実行使用メモリ 65,296 KB
最終ジャッジ日時 2023-10-27 16:16:47
合計ジャッジ時間 1,382 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
53,660 KB
testcase_01 AC 33 ms
53,660 KB
testcase_02 AC 38 ms
53,660 KB
testcase_03 AC 38 ms
55,708 KB
testcase_04 AC 40 ms
55,708 KB
testcase_05 AC 51 ms
57,756 KB
testcase_06 AC 48 ms
65,296 KB
testcase_07 AC 33 ms
53,660 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict

dd = defaultdict(int)
mx, nm = 0, 0

n = int(input())
for i in range(n):
    s = len(input()) - 2
    dd[s] += 1
    if dd[s] > mx or dd[s] == mx and s > nm:
        mx, nm = dd[s], s
print(nm)
0