結果

問題 No.706 多眼生物の調査
ユーザー surprise_tanakasurprise_tanaka
提出日時 2018-11-16 03:08:34
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 415 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 10,712 KB
実行使用メモリ 10,544 KB
最終ジャッジ日時 2023-08-26 01:25:12
合計ジャッジ時間 1,459 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,328 KB
testcase_01 AC 27 ms
10,416 KB
testcase_02 AC 27 ms
10,432 KB
testcase_03 AC 28 ms
10,452 KB
testcase_04 AC 27 ms
10,504 KB
testcase_05 AC 28 ms
10,276 KB
testcase_06 WA -
testcase_07 AC 26 ms
10,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import statistics

N = int(input())
S_list = []
for i in range(N):
    S_list.append(input().count("^"))
try:
    print(statistics.mode(S_list))
except:
    S_list.sort()
    max = 0
    count = 0
    for i in range(N-1):
        if S_list[i] == S_list[i+1]:
            count += 1
        else:
            count = 0
        if max <= count:
            max = count
            result = S_list[i]
    print(result)
0