結果

問題 No.1994 Confusing Name
ユーザー tonyu0
提出日時 2022-07-01 23:37:57
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 314 bytes
コンパイル時間 245 ms
コンパイル使用メモリ 81,792 KB
実行使用メモリ 945,512 KB
最終ジャッジ日時 2024-11-26 07:38:32
合計ジャッジ時間 52,359 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 MLE * 1
other AC * 7 TLE * 7 MLE * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
from string import ascii_lowercase
n,*s=open(0).read().split()
n=int(n)
d=defaultdict(int)
for t in s:
	d[t]+=1
for t in s:
    o=0
    for i in range(len(t)):
        for c in list(ascii_lowercase):
            if t[i]==c:continue
            o+=d[t[:i]+c+t[i+1:]]
    print(o)
0