結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー togatogatogatoga
提出日時 2015-08-20 08:37:57
言語 Python2
(2.7.18)
結果
AC  
実行時間 111 ms / 5,000 ms
コード長 253 bytes
コンパイル時間 320 ms
コンパイル使用メモリ 6,660 KB
実行使用メモリ 7,460 KB
最終ジャッジ日時 2023-09-08 14:35:38
合計ジャッジ時間 2,180 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
6,280 KB
testcase_01 AC 81 ms
7,400 KB
testcase_02 AC 11 ms
5,988 KB
testcase_03 AC 10 ms
6,164 KB
testcase_04 AC 10 ms
6,036 KB
testcase_05 AC 111 ms
7,396 KB
testcase_06 AC 11 ms
6,044 KB
testcase_07 AC 11 ms
6,088 KB
testcase_08 AC 11 ms
5,956 KB
testcase_09 AC 11 ms
6,084 KB
testcase_10 AC 11 ms
6,116 KB
testcase_11 AC 10 ms
6,060 KB
testcase_12 AC 11 ms
6,024 KB
testcase_13 AC 11 ms
5,944 KB
testcase_14 AC 51 ms
6,924 KB
testcase_15 AC 28 ms
6,352 KB
testcase_16 AC 64 ms
7,292 KB
testcase_17 AC 26 ms
6,400 KB
testcase_18 AC 62 ms
7,152 KB
testcase_19 AC 47 ms
6,700 KB
testcase_20 AC 80 ms
7,460 KB
testcase_21 AC 13 ms
6,056 KB
testcase_22 AC 35 ms
6,560 KB
testcase_23 AC 75 ms
7,456 KB
testcase_24 AC 78 ms
7,392 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=input()
L = map(int, raw_input().split())
deg = [0] * 7
ans = 0
index = 0
for x in L:
    deg[x] += 1
    if (ans < deg[x]):
        ans = deg[x]
        index = x
    if (ans == deg[x]):
        ans = deg[x]
        index = max(index, x)
print index
0