結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー otsuneko
提出日時 2021-05-07 08:56:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 5,000 ms
コード長 311 bytes
コンパイル時間 267 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 80,384 KB
最終ジャッジ日時 2024-09-14 22:04:30
合計ジャッジ時間 2,482 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter
N = int(input())
L = list(map(int,input().split()))
d = Counter(L)

max_v = 0
level = 0
for key in d:
    if d[key] > max_v:
        max_v = d[key]
        level = key
    elif d[key] == max_v and key > level:
        max_v = d[key]
        level = key
print(level)
0