結果
問題 | No.706 多眼生物の調査 |
ユーザー | Theta |
提出日時 | 2022-10-18 16:46:42 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 21 ms / 2,000 ms |
コード長 | 309 bytes |
コンパイル時間 | 264 ms |
コンパイル使用メモリ | 10,592 KB |
実行使用メモリ | 8,868 KB |
最終ジャッジ日時 | 2023-09-11 09:45:01 |
合計ジャッジ時間 | 914 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 18 ms
8,580 KB |
testcase_01 | AC | 18 ms
8,540 KB |
testcase_02 | AC | 18 ms
8,632 KB |
testcase_03 | AC | 19 ms
8,556 KB |
testcase_04 | AC | 19 ms
8,512 KB |
testcase_05 | AC | 20 ms
8,680 KB |
testcase_06 | AC | 21 ms
8,868 KB |
testcase_07 | AC | 18 ms
8,472 KB |
ソースコード
from collections import defaultdict, Counter def main(): N = int(input()) animals = defaultdict(int) for _ in range(N): animals[input()] += 1 print(max(Counter(animals).most_common(), key=lambda elm: (elm[1], elm[0]))[0].count("^")) if __name__ == "__main__": main()