結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー takakin
提出日時 2020-03-29 18:52:16
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 61 ms / 5,000 ms
コード長 260 bytes
コンパイル時間 355 ms
コンパイル使用メモリ 12,032 KB
実行使用メモリ 12,112 KB
最終ジャッジ日時 2025-01-02 15:40:38
合計ジャッジ時間 2,645 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
n=int(input())
L=[int(i) for i in input().split()]
import collections
LL=collections.Counter(L)
k,v=0,0
for l in LL.keys():
  if LL[l]>v:
    k=l
    v=LL[l]
  elif LL[l]==v:
    if l>k:
      k=l
print(k)
0