結果

問題 No.1994 Confusing Name
ユーザー googol_S0googol_S0
提出日時 2022-07-01 21:51:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,327 ms / 2,000 ms
コード長 287 bytes
コンパイル時間 290 ms
コンパイル使用メモリ 87,264 KB
実行使用メモリ 85,096 KB
最終ジャッジ日時 2023-08-17 09:24:39
合計ジャッジ時間 20,397 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
76,824 KB
testcase_01 AC 75 ms
76,396 KB
testcase_02 AC 77 ms
76,256 KB
testcase_03 AC 73 ms
71,540 KB
testcase_04 AC 70 ms
71,164 KB
testcase_05 AC 94 ms
76,880 KB
testcase_06 AC 107 ms
77,396 KB
testcase_07 AC 88 ms
76,792 KB
testcase_08 AC 101 ms
77,364 KB
testcase_09 AC 111 ms
77,384 KB
testcase_10 AC 100 ms
77,440 KB
testcase_11 AC 95 ms
76,944 KB
testcase_12 AC 985 ms
84,240 KB
testcase_13 AC 1,294 ms
84,504 KB
testcase_14 AC 1,186 ms
84,548 KB
testcase_15 AC 1,061 ms
82,732 KB
testcase_16 AC 911 ms
81,796 KB
testcase_17 AC 1,053 ms
82,304 KB
testcase_18 AC 1,266 ms
85,096 KB
testcase_19 AC 1,289 ms
84,704 KB
testcase_20 AC 1,327 ms
84,712 KB
testcase_21 AC 295 ms
79,356 KB
testcase_22 AC 198 ms
77,964 KB
testcase_23 AC 1,110 ms
84,400 KB
testcase_24 AC 1,084 ms
84,356 KB
testcase_25 AC 736 ms
81,312 KB
testcase_26 AC 384 ms
79,532 KB
testcase_27 AC 981 ms
83,748 KB
testcase_28 AC 784 ms
81,800 KB
testcase_29 AC 177 ms
77,640 KB
testcase_30 AC 858 ms
82,232 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
S=[input() for i in range(N)]
T=set(S)
for i in range(N):
  ANS=0
  for j in range(len(S[i])):
    a,b=S[i][:j],S[i][j+1:]
    for k in range(26):
      c=chr(ord('a')+k)
      if S[i][j]==c:
        continue
      if a+c+b in T:
        ANS+=1
  T.add(S[i])
  print(ANS)
0