結果
| 問題 | No.706 多眼生物の調査 |
| コンテスト | |
| ユーザー |
r_ishida
|
| 提出日時 | 2026-01-19 06:46:00 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 52 ms / 2,000 ms |
| コード長 | 523 bytes |
| 記録 | |
| コンパイル時間 | 304 ms |
| コンパイル使用メモリ | 82,608 KB |
| 実行使用メモリ | 60,128 KB |
| 最終ジャッジ日時 | 2026-01-19 06:46:02 |
| 合計ジャッジ時間 | 1,721 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
ソースコード
import math
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
n = I()
from collections import defaultdict
d = defaultdict(int)
for _ in range(n):
s = S()
d[s.count('^')] += 1
d_s = sorted(d.items(), key=lambda x:(x[1], x[0]), reverse=True)
print(d_s[0][0])
r_ishida