結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー takakintakakin
提出日時 2020-03-29 18:52:16
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 45 ms / 5,000 ms
コード長 260 bytes
コンパイル時間 148 ms
コンパイル使用メモリ 10,596 KB
実行使用メモリ 10,064 KB
最終ジャッジ日時 2023-08-30 19:56:19
合計ジャッジ時間 1,896 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
8,512 KB
testcase_01 AC 44 ms
10,064 KB
testcase_02 AC 18 ms
8,596 KB
testcase_03 AC 18 ms
8,428 KB
testcase_04 AC 18 ms
8,492 KB
testcase_05 AC 45 ms
10,044 KB
testcase_06 AC 18 ms
8,612 KB
testcase_07 AC 18 ms
8,428 KB
testcase_08 AC 17 ms
8,488 KB
testcase_09 AC 18 ms
8,492 KB
testcase_10 AC 17 ms
8,460 KB
testcase_11 AC 17 ms
8,644 KB
testcase_12 AC 20 ms
8,592 KB
testcase_13 AC 18 ms
8,464 KB
testcase_14 AC 33 ms
8,904 KB
testcase_15 AC 23 ms
8,908 KB
testcase_16 AC 37 ms
9,624 KB
testcase_17 AC 24 ms
8,632 KB
testcase_18 AC 37 ms
9,232 KB
testcase_19 AC 30 ms
9,152 KB
testcase_20 AC 43 ms
10,028 KB
testcase_21 AC 19 ms
8,628 KB
testcase_22 AC 26 ms
8,720 KB
testcase_23 AC 41 ms
9,856 KB
testcase_24 AC 42 ms
10,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
n=int(input())
L=[int(i) for i in input().split()]
import collections
LL=collections.Counter(L)
k,v=0,0
for l in LL.keys():
  if LL[l]>v:
    k=l
    v=LL[l]
  elif LL[l]==v:
    if l>k:
      k=l
print(k)
0