結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー tarotaro789tarotaro789
提出日時 2017-10-24 00:16:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 45 ms / 5,000 ms
コード長 350 bytes
コンパイル時間 142 ms
コンパイル使用メモリ 10,688 KB
実行使用メモリ 10,436 KB
最終ジャッジ日時 2023-09-08 15:17:18
合計ジャッジ時間 1,951 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
8,616 KB
testcase_01 AC 45 ms
10,420 KB
testcase_02 AC 19 ms
8,548 KB
testcase_03 AC 19 ms
8,456 KB
testcase_04 AC 19 ms
8,488 KB
testcase_05 AC 45 ms
10,256 KB
testcase_06 AC 18 ms
8,584 KB
testcase_07 AC 19 ms
8,500 KB
testcase_08 AC 18 ms
8,452 KB
testcase_09 AC 18 ms
8,472 KB
testcase_10 AC 20 ms
8,468 KB
testcase_11 AC 18 ms
8,436 KB
testcase_12 AC 19 ms
8,608 KB
testcase_13 AC 20 ms
8,556 KB
testcase_14 AC 34 ms
9,288 KB
testcase_15 AC 26 ms
9,152 KB
testcase_16 AC 39 ms
9,844 KB
testcase_17 AC 24 ms
8,968 KB
testcase_18 AC 39 ms
9,968 KB
testcase_19 AC 33 ms
9,516 KB
testcase_20 AC 44 ms
10,272 KB
testcase_21 AC 20 ms
8,528 KB
testcase_22 AC 27 ms
9,008 KB
testcase_23 AC 43 ms
10,052 KB
testcase_24 AC 44 ms
10,436 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

n=int(input())
ls=[int(i) for i in input().split()]
cls=[]
#リストの値をカウント
cnt=Counter(ls)
#カウント最大数を取得
max_v=max(cnt.values())
#カウント最大数の値を追加
for value,count in cnt.items():
    if max_v==count:
        cls.append(value)
#最大値を出力
print(max(cls))

0