結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー hiro1729hiro1729
提出日時 2023-11-25 08:39:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 65 ms / 5,000 ms
コード長 243 bytes
コンパイル時間 176 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 80,808 KB
最終ジャッジ日時 2023-11-25 08:39:30
合計ジャッジ時間 2,717 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
61,960 KB
testcase_01 AC 65 ms
80,788 KB
testcase_02 AC 42 ms
53,460 KB
testcase_03 AC 41 ms
53,460 KB
testcase_04 AC 41 ms
53,460 KB
testcase_05 AC 65 ms
80,808 KB
testcase_06 AC 41 ms
53,460 KB
testcase_07 AC 41 ms
53,460 KB
testcase_08 AC 41 ms
53,460 KB
testcase_09 AC 42 ms
53,460 KB
testcase_10 AC 41 ms
53,460 KB
testcase_11 AC 41 ms
53,460 KB
testcase_12 AC 41 ms
53,460 KB
testcase_13 AC 41 ms
53,460 KB
testcase_14 AC 57 ms
72,808 KB
testcase_15 AC 49 ms
65,312 KB
testcase_16 AC 61 ms
77,644 KB
testcase_17 AC 49 ms
64,860 KB
testcase_18 AC 60 ms
77,608 KB
testcase_19 AC 57 ms
71,876 KB
testcase_20 AC 64 ms
80,808 KB
testcase_21 AC 46 ms
61,972 KB
testcase_22 AC 52 ms
68,892 KB
testcase_23 AC 64 ms
80,724 KB
testcase_24 AC 65 ms
80,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter
N = int(input())
L = list(map(int, input().split()))
c = Counter(L)
max_cnt = 0
ans = -1
for i, j in list(c.items()):
	if j > max_cnt:
		max_cnt = j
		ans = i
	elif j == max_cnt and i > ans:
		ans = i
print(ans)
0