結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー konabe
提出日時 2018-02-20 18:54:28
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 81 ms / 5,000 ms
コード長 323 bytes
コンパイル時間 109 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 12,656 KB
最終ジャッジ日時 2024-06-26 08:22:57
合計ジャッジ時間 2,067 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
L = list(map(int, input().split()))
M = {}
for Li in L:
    if Li in M.keys():
        M[Li]+=1
    else:
        M[Li] = 1

M_sorted = sorted(M.items(), key=lambda x: x[1])

max_cnt = M_sorted[-1][1]

M2 = []

for Mi in M_sorted:
    if Mi[1] == max_cnt:
        M2.append(Mi[0])

M2.sort()
print(M2[-1])
0