結果

問題 No.1994 Confusing Name
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2022-07-01 22:04:07
言語 PyPy3
(7.3.15)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 390 bytes
コンパイル時間 317 ms
コンパイル使用メモリ 87,268 KB
実行使用メモリ 93,012 KB
最終ジャッジ日時 2023-08-17 09:37:07
合計ジャッジ時間 26,569 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
76,556 KB
testcase_01 AC 80 ms
76,532 KB
testcase_02 AC 86 ms
76,708 KB
testcase_03 AC 74 ms
71,420 KB
testcase_04 AC 76 ms
71,524 KB
testcase_05 AC 102 ms
77,260 KB
testcase_06 AC 120 ms
77,136 KB
testcase_07 AC 93 ms
76,796 KB
testcase_08 AC 112 ms
77,272 KB
testcase_09 AC 124 ms
77,296 KB
testcase_10 AC 111 ms
77,496 KB
testcase_11 AC 105 ms
77,408 KB
testcase_12 AC 1,619 ms
92,476 KB
testcase_13 TLE -
testcase_14 AC 1,665 ms
92,724 KB
testcase_15 AC 1,419 ms
88,472 KB
testcase_16 AC 1,249 ms
87,012 KB
testcase_17 AC 1,431 ms
88,564 KB
testcase_18 AC 1,740 ms
92,620 KB
testcase_19 AC 1,769 ms
92,856 KB
testcase_20 AC 1,811 ms
92,976 KB
testcase_21 AC 392 ms
80,400 KB
testcase_22 AC 244 ms
78,644 KB
testcase_23 AC 1,511 ms
92,104 KB
testcase_24 AC 1,440 ms
92,512 KB
testcase_25 AC 942 ms
85,736 KB
testcase_26 AC 502 ms
81,940 KB
testcase_27 AC 1,333 ms
91,056 KB
testcase_28 AC 1,027 ms
86,828 KB
testcase_29 AC 220 ms
78,112 KB
testcase_30 AC 1,115 ms
88,188 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
S = [input() for i in range(n)]
dic = {}
for s in S:
    dic[s] = dic.get(s,0)+1

for s in S:
    ans = 0
    ns = list(s)
    for i in range(len(s)):
        b = ns[i]
        for j in range(26):
            c = chr(ord("a")+j)
            if b == c:
                continue
            ns[i] = c
            ans += dic.get("".join(ns),0)
        ns[i] = b
    print(ans)
0