結果

問題 No.2201 p@$$w0rd
ユーザー flygonflygon
提出日時 2023-02-03 21:28:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 56 ms / 2,000 ms
コード長 565 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 81,792 KB
実行使用メモリ 61,440 KB
最終ジャッジ日時 2024-07-02 19:11:39
合計ジャッジ時間 2,219 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
59,648 KB
testcase_01 AC 49 ms
60,032 KB
testcase_02 AC 49 ms
59,264 KB
testcase_03 AC 54 ms
61,440 KB
testcase_04 AC 56 ms
60,288 KB
testcase_05 AC 48 ms
59,648 KB
testcase_06 AC 52 ms
60,672 KB
testcase_07 AC 54 ms
61,312 KB
testcase_08 AC 49 ms
60,032 KB
testcase_09 AC 48 ms
59,264 KB
testcase_10 AC 52 ms
60,416 KB
testcase_11 AC 55 ms
61,184 KB
testcase_12 AC 52 ms
60,672 KB
testcase_13 AC 50 ms
60,288 KB
testcase_14 AC 51 ms
60,800 KB
testcase_15 AC 52 ms
60,544 KB
testcase_16 AC 51 ms
60,416 KB
testcase_17 AC 49 ms
59,392 KB
testcase_18 AC 53 ms
60,928 KB
testcase_19 AC 53 ms
60,800 KB
testcase_20 AC 49 ms
59,520 KB
testcase_21 AC 51 ms
60,288 KB
testcase_22 AC 54 ms
61,312 KB
testcase_23 AC 50 ms
60,160 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