結果
| 問題 |
No.79 過小評価ダメ・ゼッタイ
|
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2022-05-12 03:38:45 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 51 ms / 5,000 ms |
| コード長 | 299 bytes |
| コンパイル時間 | 934 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 12,524 KB |
| 最終ジャッジ日時 | 2024-07-19 18:03:48 |
| 合計ジャッジ時間 | 1,808 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
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)
norioc