結果

問題 No.1994 Confusing Name
ユーザー titiatitia
提出日時 2022-07-01 21:38:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,113 ms / 2,000 ms
コード長 415 bytes
コンパイル時間 351 ms
コンパイル使用メモリ 87,276 KB
実行使用メモリ 83,740 KB
最終ジャッジ日時 2023-08-17 09:02:55
合計ジャッジ時間 18,151 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
76,908 KB
testcase_01 AC 77 ms
76,408 KB
testcase_02 AC 81 ms
76,364 KB
testcase_03 AC 68 ms
71,272 KB
testcase_04 AC 68 ms
71,184 KB
testcase_05 AC 93 ms
76,952 KB
testcase_06 AC 104 ms
77,448 KB
testcase_07 AC 83 ms
76,796 KB
testcase_08 AC 94 ms
77,344 KB
testcase_09 AC 103 ms
77,604 KB
testcase_10 AC 94 ms
76,960 KB
testcase_11 AC 91 ms
77,112 KB
testcase_12 AC 894 ms
83,380 KB
testcase_13 AC 1,113 ms
83,280 KB
testcase_14 AC 1,038 ms
83,408 KB
testcase_15 AC 1,036 ms
81,412 KB
testcase_16 AC 883 ms
80,760 KB
testcase_17 AC 999 ms
81,476 KB
testcase_18 AC 1,093 ms
83,740 KB
testcase_19 AC 1,089 ms
83,076 KB
testcase_20 AC 1,102 ms
83,488 KB
testcase_21 AC 275 ms
78,240 KB
testcase_22 AC 187 ms
77,944 KB
testcase_23 AC 941 ms
83,324 KB
testcase_24 AC 919 ms
83,092 KB
testcase_25 AC 739 ms
80,432 KB
testcase_26 AC 353 ms
78,720 KB
testcase_27 AC 861 ms
82,656 KB
testcase_28 AC 739 ms
80,476 KB
testcase_29 AC 166 ms
77,836 KB
testcase_30 AC 926 ms
81,232 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