結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー alcoholampalcoholamp
提出日時 2019-10-30 20:20:18
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 338 bytes
コンパイル時間 199 ms
コンパイル使用メモリ 10,540 KB
実行使用メモリ 10,080 KB
最終ジャッジ日時 2023-10-12 23:53:57
合計ジャッジ時間 2,131 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,764 KB
testcase_01 WA -
testcase_02 AC 15 ms
7,768 KB
testcase_03 AC 15 ms
7,772 KB
testcase_04 AC 16 ms
7,952 KB
testcase_05 AC 41 ms
9,892 KB
testcase_06 AC 15 ms
7,728 KB
testcase_07 AC 15 ms
7,732 KB
testcase_08 AC 15 ms
7,820 KB
testcase_09 AC 15 ms
7,884 KB
testcase_10 AC 15 ms
7,732 KB
testcase_11 AC 15 ms
7,788 KB
testcase_12 AC 15 ms
7,760 KB
testcase_13 AC 16 ms
7,772 KB
testcase_14 AC 30 ms
8,856 KB
testcase_15 AC 22 ms
8,556 KB
testcase_16 AC 34 ms
9,512 KB
testcase_17 WA -
testcase_18 AC 33 ms
9,172 KB
testcase_19 AC 29 ms
9,016 KB
testcase_20 AC 41 ms
9,872 KB
testcase_21 AC 16 ms
7,912 KB
testcase_22 WA -
testcase_23 AC 38 ms
9,588 KB
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

class Problem0079:
	def solve(this):
		n = int(input())
		l = list(map(int, input().split()))
		
		res = {}
		for v in l:
			res[v] = res.get(v,0) + 1
		
		ans = 0	
		cnt = 0
		for (k,v) in res.items():
			if cnt <= v:
				ans = max(ans, k)
				cnt = v
		print(ans)
		
if __name__ == "__main__":
	problem = Problem0079()
	problem.solve()
0