結果

問題 No.706 多眼生物の調査
ユーザー simamumu
提出日時 2018-06-29 22:35:49
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 377 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-06-30 23:59:19
合計ジャッジ時間 830 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

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