結果

問題 No.706 多眼生物の調査
ユーザー brthyyjpbrthyyjp
提出日時 2020-05-28 13:17:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 65 ms / 2,000 ms
コード長 278 bytes
コンパイル時間 266 ms
コンパイル使用メモリ 82,436 KB
実行使用メモリ 64,884 KB
最終ジャッジ日時 2024-04-21 05:35:58
合計ジャッジ時間 1,396 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
51,884 KB
testcase_01 AC 35 ms
52,136 KB
testcase_02 AC 35 ms
52,408 KB
testcase_03 AC 36 ms
52,756 KB
testcase_04 AC 39 ms
54,144 KB
testcase_05 AC 44 ms
55,784 KB
testcase_06 AC 65 ms
64,884 KB
testcase_07 AC 38 ms
51,712 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
d = {}
for i in range(n):
    s = str(input())
    e = s.count('^')
    if e not in d:
        d[e] = 1
    else:
        d[e] += 1

kv = list(d.items())
kv.sort()
max_ = -1
ans = -1
for k, v in kv:
    if v >= max_:
        max_ = v
        ans = k
print(ans)
0