結果

問題 No.706 多眼生物の調査
ユーザー neterukunneterukun
提出日時 2020-03-08 19:18:28
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 320 bytes
コンパイル時間 210 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 63,616 KB
最終ジャッジ日時 2024-04-25 02:40:12
合計ジャッジ時間 935 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
51,712 KB
testcase_01 AC 34 ms
51,968 KB
testcase_02 AC 37 ms
52,096 KB
testcase_03 AC 38 ms
52,992 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
s = [input() for i in range(n)]

memo = {}
for i in range(n):
    tmp = len(s[i]) - 2
    if tmp not in memo:
        memo[tmp] = 1
    else:
        memo[tmp] += 1

ans = 0
ans_num = 0
for num in memo:
    if memo[num] >= ans_num and num > ans:
        ans_num = memo[num]
        ans = num
print(ans)
0