結果

問題 No.2201 p@$$w0rd
ユーザー flygonflygon
提出日時 2023-02-03 21:28:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 565 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 86,980 KB
実行使用メモリ 76,592 KB
最終ジャッジ日時 2023-09-15 16:53:19
合計ジャッジ時間 3,311 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
76,268 KB
testcase_01 AC 78 ms
76,492 KB
testcase_02 AC 79 ms
76,576 KB
testcase_03 AC 83 ms
76,308 KB
testcase_04 AC 81 ms
76,244 KB
testcase_05 AC 79 ms
76,456 KB
testcase_06 AC 83 ms
76,336 KB
testcase_07 AC 86 ms
76,372 KB
testcase_08 AC 80 ms
76,352 KB
testcase_09 AC 77 ms
76,296 KB
testcase_10 AC 81 ms
76,252 KB
testcase_11 AC 83 ms
76,376 KB
testcase_12 AC 81 ms
76,276 KB
testcase_13 AC 80 ms
76,284 KB
testcase_14 AC 80 ms
76,176 KB
testcase_15 AC 85 ms
76,216 KB
testcase_16 AC 82 ms
76,220 KB
testcase_17 AC 79 ms
76,428 KB
testcase_18 AC 82 ms
76,276 KB
testcase_19 AC 82 ms
76,460 KB
testcase_20 AC 80 ms
76,428 KB
testcase_21 AC 81 ms
76,340 KB
testcase_22 AC 84 ms
76,392 KB
testcase_23 AC 83 ms
76,592 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s = list(input())
l = []
d = {"l":"1","o":"0","a":"@","s":"$"}
ki = ["@", "$"]
nums = set([str(i) for i in range(10)])
ans = set()
for bit in range(1<<8):
  ch = []
  for i in range(8):
    if s[i] not in d.keys(): continue
    if (bit >> i) & 1:
      ch.append(i)
  
  new = s[::1]
  for i in ch:
    new[i] = d[s[i]]
  
  num = 0
  al = 0
  kig = 0
  for i in range(8):
    if ord("a") <= ord(new[i]) <= ord("z"):
      al = 1
    if new[i] in ki:
      kig = 1
    if new[i] in nums:
      num = 1
  if al & kig & num:
    ans.add("".join(new))

print(len(ans))
0