結果
問題 | No.706 多眼生物の調査 |
ユーザー |
![]() |
提出日時 | 2020-01-03 09:49:37 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 362 bytes |
コンパイル時間 | 142 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 11,136 KB |
最終ジャッジ日時 | 2024-11-22 18:55:16 |
合計ジャッジ時間 | 861 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 RE * 1 |
other | AC * 1 RE * 4 |
ソースコード
import collections n = int(input()) s_list = [input() for i in range(n)] max_freq = -1 max_key = -1 s_clc = collections.Counter(s_list) for key in s_clc.keys(): if s_clc[key] > max_freq: max_freq = s_clc[key] max_key = len(key) elif s_clc[key] == max_freq and len(key) > len(max_key): max_key = len(key) print(max_key - 2)