結果

問題 No.1994 Confusing Name
ユーザー tonyu0
提出日時 2022-07-01 23:25:56
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 314 bytes
コンパイル時間 128 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 371,144 KB
最終ジャッジ日時 2024-11-26 07:23:35
合計ジャッジ時間 54,552 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11 TLE * 17
権限があれば一括ダウンロードができます

ソースコード

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