結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー MitI_7MitI_7
提出日時 2015-07-23 20:45:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 45 ms / 5,000 ms
コード長 345 bytes
コンパイル時間 475 ms
コンパイル使用メモリ 10,464 KB
実行使用メモリ 9,756 KB
最終ジャッジ日時 2023-09-08 14:32:07
合計ジャッジ時間 1,759 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,532 KB
testcase_01 AC 44 ms
9,756 KB
testcase_02 AC 17 ms
8,476 KB
testcase_03 AC 18 ms
8,576 KB
testcase_04 AC 17 ms
8,464 KB
testcase_05 AC 44 ms
9,440 KB
testcase_06 AC 18 ms
8,464 KB
testcase_07 AC 17 ms
8,444 KB
testcase_08 AC 18 ms
8,556 KB
testcase_09 AC 18 ms
8,444 KB
testcase_10 AC 18 ms
8,544 KB
testcase_11 AC 18 ms
8,480 KB
testcase_12 AC 18 ms
8,524 KB
testcase_13 AC 18 ms
8,444 KB
testcase_14 AC 33 ms
8,884 KB
testcase_15 AC 24 ms
8,736 KB
testcase_16 AC 38 ms
9,500 KB
testcase_17 AC 25 ms
8,620 KB
testcase_18 AC 38 ms
9,488 KB
testcase_19 AC 32 ms
9,020 KB
testcase_20 AC 45 ms
9,440 KB
testcase_21 AC 19 ms
8,468 KB
testcase_22 AC 27 ms
8,772 KB
testcase_23 AC 42 ms
9,212 KB
testcase_24 AC 42 ms
9,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict


def main():
    N = input()
    l = map(int, input().split(" "))
    d = defaultdict(int)
    for i in l:
        d[i] += 1
    ans = -1
    max_v = 0
    for k, v in sorted(d.items()):
        if v >= max_v:
            max_v = v
            ans = k

    print(ans)


if __name__ == '__main__':
    main()
0