結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー ThetaTheta
提出日時 2022-10-28 13:55:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 303 bytes
コンパイル時間 336 ms
コンパイル使用メモリ 10,744 KB
実行使用メモリ 20,296 KB
最終ジャッジ日時 2023-09-19 06:40:27
合計ジャッジ時間 2,606 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
9,084 KB
testcase_01 AC 88 ms
20,028 KB
testcase_02 AC 20 ms
8,556 KB
testcase_03 AC 20 ms
8,552 KB
testcase_04 AC 19 ms
8,644 KB
testcase_05 AC 88 ms
20,296 KB
testcase_06 AC 19 ms
8,412 KB
testcase_07 WA -
testcase_08 AC 19 ms
8,516 KB
testcase_09 AC 21 ms
8,604 KB
testcase_10 AC 20 ms
8,648 KB
testcase_11 AC 19 ms
8,476 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 60 ms
15,232 KB
testcase_15 AC 36 ms
11,212 KB
testcase_16 AC 71 ms
17,468 KB
testcase_17 AC 35 ms
11,440 KB
testcase_18 AC 70 ms
17,080 KB
testcase_19 AC 57 ms
14,728 KB
testcase_20 AC 89 ms
20,248 KB
testcase_21 AC 22 ms
8,692 KB
testcase_22 AC 44 ms
12,276 KB
testcase_23 AC 84 ms
19,484 KB
testcase_24 AC 88 ms
19,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter


def main():
    N = int(input())
    L = list(map(int, input().split()))
    l_counter = Counter(L)

    sorted_list = sorted(
        range(1, N+1), key=lambda num: (l_counter[num], num), reverse=True)
    print(sorted_list[0])


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