結果

問題 No.1994 Confusing Name
ユーザー tonyu0tonyu0
提出日時 2022-07-01 23:37:57
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 314 bytes
コンパイル時間 408 ms
コンパイル使用メモリ 87,072 KB
実行使用メモリ 594,948 KB
最終ジャッジ日時 2023-08-17 11:24:06
合計ジャッジ時間 7,972 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 155 ms
79,768 KB
testcase_01 AC 152 ms
79,088 KB
testcase_02 AC 153 ms
79,272 KB
testcase_03 AC 145 ms
77,824 KB
testcase_04 AC 145 ms
77,832 KB
testcase_05 AC 199 ms
91,384 KB
testcase_06 AC 235 ms
106,028 KB
testcase_07 AC 174 ms
84,260 KB
testcase_08 AC 215 ms
99,876 KB
testcase_09 AC 238 ms
108,568 KB
testcase_10 AC 199 ms
92,876 KB
testcase_11 AC 199 ms
92,436 KB
testcase_12 MLE -
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