結果

問題 No.706 多眼生物の調査
ユーザー ohanaohana
提出日時 2023-10-27 16:08:10
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 230 bytes
コンパイル時間 336 ms
コンパイル使用メモリ 81,832 KB
実行使用メモリ 65,292 KB
最終ジャッジ日時 2023-10-27 16:08:12
合計ジャッジ時間 1,794 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,656 KB
testcase_01 AC 39 ms
53,656 KB
testcase_02 AC 39 ms
53,656 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 39 ms
53,656 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(s)
0