結果

問題 No.1994 Confusing Name
ユーザー tonyu0tonyu0
提出日時 2022-07-01 23:25:56
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
TLE  
実行時間 -
コード長 314 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 10,744 KB
実行使用メモリ 21,668 KB
最終ジャッジ日時 2023-08-17 11:10:44
合計ジャッジ時間 5,135 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
9,200 KB
testcase_01 AC 27 ms
9,348 KB
testcase_02 AC 28 ms
9,288 KB
testcase_03 AC 27 ms
9,096 KB
testcase_04 AC 26 ms
9,236 KB
testcase_05 AC 89 ms
14,788 KB
testcase_06 AC 174 ms
20,616 KB
testcase_07 AC 54 ms
11,948 KB
testcase_08 AC 135 ms
20,124 KB
testcase_09 AC 186 ms
21,668 KB
testcase_10 AC 99 ms
15,072 KB
testcase_11 AC 90 ms
14,756 KB
testcase_12 TLE -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
権限があれば一括ダウンロードができます

ソースコード

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