結果

問題 No.79 過小評価ダメ・ゼッタイ
コンテスト
ユーザー ymgckyo
提出日時 2017-11-04 21:44:52
言語 Python3
(3.14.3 + numpy 2.4.2 + scipy 1.17.0)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 117 ms / 5,000 ms
コード長 444 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 445 ms
コンパイル使用メモリ 20,700 KB
実行使用メモリ 16,856 KB
最終ジャッジ日時 2026-03-13 00:16:31
合計ジャッジ時間 3,916 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n = int(input())
input_list = list(map(int, input().split()))

check_list = []
element = 0
counter = 0
for new_element in input_list:
    if new_element in check_list:
        continue

    new_counter = input_list.count(new_element)
    if new_counter > counter:
        element, counter = new_element, new_counter
    elif new_counter == counter:
        element = max(element, new_element)

    check_list.append(new_element)

print(element)
0