結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー 👑 yumechiyumechi
提出日時 2017-10-09 23:33:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 92 ms / 5,000 ms
コード長 298 bytes
コンパイル時間 376 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 89,284 KB
最終ジャッジ日時 2023-09-08 15:17:05
合計ジャッジ時間 3,621 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
76,600 KB
testcase_01 AC 92 ms
88,956 KB
testcase_02 AC 71 ms
71,576 KB
testcase_03 AC 72 ms
71,580 KB
testcase_04 AC 71 ms
71,360 KB
testcase_05 AC 91 ms
89,096 KB
testcase_06 AC 72 ms
71,220 KB
testcase_07 AC 72 ms
71,356 KB
testcase_08 AC 71 ms
71,404 KB
testcase_09 AC 71 ms
71,264 KB
testcase_10 AC 70 ms
71,312 KB
testcase_11 AC 69 ms
71,248 KB
testcase_12 AC 72 ms
71,436 KB
testcase_13 AC 74 ms
71,300 KB
testcase_14 AC 86 ms
83,516 KB
testcase_15 AC 80 ms
77,748 KB
testcase_16 AC 90 ms
86,100 KB
testcase_17 AC 79 ms
77,352 KB
testcase_18 AC 88 ms
85,784 KB
testcase_19 AC 85 ms
82,392 KB
testcase_20 AC 90 ms
89,284 KB
testcase_21 AC 75 ms
76,596 KB
testcase_22 AC 80 ms
79,244 KB
testcase_23 AC 91 ms
89,016 KB
testcase_24 AC 91 ms
89,068 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
arr = list(map(int, input().split()))
dic = {}
for a in arr:
    if a not in dic:
        dic.update({a:1})
    else:
        dic[a] += 1
maxkey = -1
maxval = -111
for k, v in sorted(dic.items()):
    if v >= maxval:
        maxval = v
        maxkey = max(maxkey, k)
print(maxkey)
0