結果

問題 No.1994 Confusing Name
ユーザー titiatitia
提出日時 2022-07-01 21:38:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,052 ms / 2,000 ms
コード長 415 bytes
コンパイル時間 254 ms
コンパイル使用メモリ 82,508 KB
実行使用メモリ 82,560 KB
最終ジャッジ日時 2024-05-04 15:54:14
合計ジャッジ時間 16,255 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
59,264 KB
testcase_01 AC 42 ms
59,648 KB
testcase_02 AC 45 ms
60,160 KB
testcase_03 AC 37 ms
51,840 KB
testcase_04 AC 41 ms
51,840 KB
testcase_05 AC 75 ms
72,576 KB
testcase_06 AC 83 ms
76,160 KB
testcase_07 AC 51 ms
67,584 KB
testcase_08 AC 76 ms
75,776 KB
testcase_09 AC 81 ms
76,160 KB
testcase_10 AC 72 ms
76,032 KB
testcase_11 AC 66 ms
73,600 KB
testcase_12 AC 804 ms
82,560 KB
testcase_13 AC 1,052 ms
82,176 KB
testcase_14 AC 973 ms
82,432 KB
testcase_15 AC 904 ms
79,616 KB
testcase_16 AC 799 ms
79,488 KB
testcase_17 AC 915 ms
79,744 KB
testcase_18 AC 1,034 ms
82,432 KB
testcase_19 AC 997 ms
82,304 KB
testcase_20 AC 1,026 ms
82,560 KB
testcase_21 AC 234 ms
77,568 KB
testcase_22 AC 165 ms
76,672 KB
testcase_23 AC 927 ms
82,176 KB
testcase_24 AC 870 ms
82,176 KB
testcase_25 AC 612 ms
79,104 KB
testcase_26 AC 308 ms
77,560 KB
testcase_27 AC 791 ms
81,408 KB
testcase_28 AC 647 ms
79,616 KB
testcase_29 AC 136 ms
76,288 KB
testcase_30 AC 752 ms
79,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N=int(input())
S=[input().strip() for i in range(N)]

SET=set(S)

ANS=[0]*N

for i in range(N):
    X=S[i]

    for j in range(len(X)):
        for c in "abcdefghijklmnopqrstuvwxyz":
            if X[j]==c:
                continue
            else:
                Y=X[:j]+c+X[j+1:]

                if Y in SET:
                    ANS[i]+=1

for ans in ANS:
    print(ans)
0