結果

問題 No.706 多眼生物の調査
ユーザー crizecrize
提出日時 2018-07-10 14:22:49
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 23 ms / 2,000 ms
コード長 334 bytes
コンパイル時間 168 ms
コンパイル使用メモリ 10,584 KB
実行使用メモリ 8,596 KB
最終ジャッジ日時 2023-09-28 21:47:18
合計ジャッジ時間 999 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,356 KB
testcase_01 AC 19 ms
8,356 KB
testcase_02 AC 19 ms
8,568 KB
testcase_03 AC 20 ms
8,596 KB
testcase_04 AC 19 ms
8,552 KB
testcase_05 AC 21 ms
8,544 KB
testcase_06 AC 23 ms
8,556 KB
testcase_07 AC 18 ms
8,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections
a=int(input())
b=[]
for i in range(a):
    c=input()
    b.append(c.count('^'))
d=collections.Counter(b)
i=1
e=d.most_common()[0][1]
answer=d.most_common()[0][0]
if a>1:
    while d.most_common()[i][1]==e:
        if d.most_common()[i][0]>answer:
            answer=d.most_common()[i][0]
        i=i+1
print(answer)
0