結果

問題 No.1994 Confusing Name
ユーザー googol_S0googol_S0
提出日時 2022-07-01 21:51:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,708 ms / 2,000 ms
コード長 287 bytes
コンパイル時間 362 ms
コンパイル使用メモリ 82,488 KB
実行使用メモリ 83,528 KB
最終ジャッジ日時 2024-05-04 16:15:55
合計ジャッジ時間 23,040 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
61,312 KB
testcase_01 AC 52 ms
59,904 KB
testcase_02 AC 51 ms
59,520 KB
testcase_03 AC 43 ms
51,840 KB
testcase_04 AC 42 ms
51,840 KB
testcase_05 AC 81 ms
71,808 KB
testcase_06 AC 98 ms
76,288 KB
testcase_07 AC 64 ms
67,200 KB
testcase_08 AC 87 ms
76,032 KB
testcase_09 AC 85 ms
76,180 KB
testcase_10 AC 70 ms
73,088 KB
testcase_11 AC 67 ms
72,192 KB
testcase_12 AC 1,133 ms
82,944 KB
testcase_13 AC 1,708 ms
82,748 KB
testcase_14 AC 1,330 ms
82,944 KB
testcase_15 AC 1,172 ms
81,408 KB
testcase_16 AC 977 ms
80,384 KB
testcase_17 AC 1,291 ms
81,464 KB
testcase_18 AC 1,446 ms
83,328 KB
testcase_19 AC 1,394 ms
83,496 KB
testcase_20 AC 1,617 ms
83,528 KB
testcase_21 AC 287 ms
77,696 KB
testcase_22 AC 177 ms
76,944 KB
testcase_23 AC 1,231 ms
83,228 KB
testcase_24 AC 1,204 ms
82,944 KB
testcase_25 AC 765 ms
79,616 KB
testcase_26 AC 379 ms
77,952 KB
testcase_27 AC 1,162 ms
82,432 KB
testcase_28 AC 810 ms
80,128 KB
testcase_29 AC 155 ms
76,928 KB
testcase_30 AC 1,112 ms
80,444 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