結果

問題 No.1994 Confusing Name
ユーザー hir355hir355
提出日時 2022-07-01 21:33:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 528 ms / 2,000 ms
コード長 310 bytes
コンパイル時間 299 ms
コンパイル使用メモリ 87,048 KB
実行使用メモリ 148,600 KB
最終ジャッジ日時 2023-08-17 08:53:18
合計ジャッジ時間 10,429 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
71,544 KB
testcase_01 AC 91 ms
71,356 KB
testcase_02 AC 91 ms
71,520 KB
testcase_03 AC 91 ms
71,612 KB
testcase_04 AC 88 ms
71,628 KB
testcase_05 AC 113 ms
77,872 KB
testcase_06 AC 127 ms
77,864 KB
testcase_07 AC 103 ms
77,204 KB
testcase_08 AC 118 ms
77,392 KB
testcase_09 AC 126 ms
78,056 KB
testcase_10 AC 114 ms
77,748 KB
testcase_11 AC 113 ms
77,516 KB
testcase_12 AC 402 ms
123,948 KB
testcase_13 AC 463 ms
139,612 KB
testcase_14 AC 499 ms
143,008 KB
testcase_15 AC 436 ms
140,868 KB
testcase_16 AC 381 ms
138,784 KB
testcase_17 AC 416 ms
146,768 KB
testcase_18 AC 513 ms
147,216 KB
testcase_19 AC 510 ms
147,632 KB
testcase_20 AC 528 ms
148,600 KB
testcase_21 AC 206 ms
88,856 KB
testcase_22 AC 158 ms
80,184 KB
testcase_23 AC 469 ms
131,656 KB
testcase_24 AC 458 ms
126,812 KB
testcase_25 AC 337 ms
117,008 KB
testcase_26 AC 235 ms
95,912 KB
testcase_27 AC 426 ms
126,152 KB
testcase_28 AC 354 ms
120,888 KB
testcase_29 AC 157 ms
80,900 KB
testcase_30 AC 356 ms
124,360 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter
n = int(input())
s = [input() for _ in range(n)]
l = [Counter() for _ in range(10)]
for st in s:
    for i in range(len(st)):
        l[i][st[:i] + st[i + 1:]] += 1
for st in s:
    ans = 0
    for i in range(len(st)):
        ans += l[i][st[:i] + st[i + 1:]] - 1
    print(ans)
0