結果

問題 No.1994 Confusing Name
コンテスト
ユーザー H20
提出日時 2022-07-01 21:49:43
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
TLE  
実行時間 -
コード長 335 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 62 ms
コンパイル使用メモリ 82,200 KB
実行使用メモリ 1,012,292 KB
最終ジャッジ日時 2026-09-30 04:44:51
合計ジャッジ時間 11,758 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9 TLE * 1 MLE * 1 -- * 17
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import string
import collections
N = int(input())
S = []
CA = collections.Counter()
for _ in range(N):
    S.append(input())
alphabets = list(string.ascii_lowercase)
for s in S:
    s = 'a'+s+'a'
    for i in range(1,len(s)-1):
        for a in alphabets:
            CA[s[:i]+a+s[i+1:]]+=1
for s in S:
    print(CA['a'+s+'a']-len(s))
0