結果

問題 No.706 多眼生物の調査
ユーザー simamumusimamumu
提出日時 2018-06-29 22:35:49
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 377 bytes
コンパイル時間 107 ms
コンパイル使用メモリ 10,716 KB
実行使用メモリ 8,660 KB
最終ジャッジ日時 2023-09-13 15:23:33
合計ジャッジ時間 873 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,504 KB
testcase_01 AC 20 ms
8,604 KB
testcase_02 AC 20 ms
8,492 KB
testcase_03 AC 19 ms
8,528 KB
testcase_04 AC 21 ms
8,524 KB
testcase_05 AC 21 ms
8,652 KB
testcase_06 AC 24 ms
8,644 KB
testcase_07 AC 18 ms
8,660 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

N = int(input())

li = []

for i in range(N):
	S = list(input())
	li.append(len(S)-2)
	

def calculate_mode(data):
	c = Counter(data)
	freq_scores = c.most_common()
	max_count = freq_scores[0][1]

	modes = []
	for num in freq_scores:
		if num[1] == max_count:
			modes.append(num[0])
	return(modes)

modes = calculate_mode(li)
print(max(modes))
0