結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー noriocnorioc
提出日時 2022-05-12 03:38:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 45 ms / 5,000 ms
コード長 299 bytes
コンパイル時間 447 ms
コンパイル使用メモリ 10,736 KB
実行使用メモリ 10,676 KB
最終ジャッジ日時 2023-09-27 00:24:26
合計ジャッジ時間 2,659 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 21 ms
8,696 KB
testcase_01 AC 44 ms
10,676 KB
testcase_02 AC 21 ms
8,712 KB
testcase_03 AC 21 ms
8,556 KB
testcase_04 AC 21 ms
8,520 KB
testcase_05 AC 45 ms
10,444 KB
testcase_06 AC 20 ms
8,620 KB
testcase_07 AC 21 ms
8,528 KB
testcase_08 AC 21 ms
8,600 KB
testcase_09 AC 21 ms
8,572 KB
testcase_10 AC 21 ms
8,668 KB
testcase_11 AC 20 ms
8,676 KB
testcase_12 AC 20 ms
8,736 KB
testcase_13 AC 21 ms
8,680 KB
testcase_14 AC 34 ms
9,500 KB
testcase_15 AC 26 ms
9,204 KB
testcase_16 AC 38 ms
9,724 KB
testcase_17 AC 26 ms
9,108 KB
testcase_18 AC 39 ms
9,624 KB
testcase_19 AC 34 ms
9,504 KB
testcase_20 AC 45 ms
10,364 KB
testcase_21 AC 21 ms
8,664 KB
testcase_22 AC 29 ms
9,160 KB
testcase_23 AC 43 ms
10,368 KB
testcase_24 AC 43 ms
10,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter
from functools import cmp_to_key

N = int(input())
L = list(map(int, input().split()))


def cmp(a, b):
    x = a[1] - b[1]
    if x == 0:
        return a[0] - b[0]
    return x


xs = sorted(Counter(L).most_common(), key=cmp_to_key(cmp))
ans = xs[-1][0]
print(ans)
0