結果

問題 No.2201 p@$$w0rd
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2023-02-03 23:20:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 527 bytes
コンパイル時間 455 ms
コンパイル使用メモリ 87,100 KB
実行使用メモリ 75,876 KB
最終ジャッジ日時 2023-09-15 19:36:52
合計ジャッジ時間 3,384 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,320 KB
testcase_01 AC 75 ms
75,248 KB
testcase_02 AC 71 ms
71,220 KB
testcase_03 AC 73 ms
71,220 KB
testcase_04 AC 84 ms
75,736 KB
testcase_05 AC 71 ms
71,316 KB
testcase_06 AC 90 ms
75,800 KB
testcase_07 AC 89 ms
75,544 KB
testcase_08 AC 70 ms
71,212 KB
testcase_09 AC 71 ms
71,120 KB
testcase_10 AC 83 ms
75,876 KB
testcase_11 AC 80 ms
75,184 KB
testcase_12 AC 85 ms
75,876 KB
testcase_13 AC 72 ms
71,144 KB
testcase_14 AC 73 ms
71,148 KB
testcase_15 AC 87 ms
75,688 KB
testcase_16 AC 88 ms
75,868 KB
testcase_17 AC 72 ms
71,276 KB
testcase_18 AC 73 ms
71,144 KB
testcase_19 AC 72 ms
70,912 KB
testcase_20 AC 73 ms
71,236 KB
testcase_21 AC 86 ms
75,720 KB
testcase_22 AC 85 ms
75,732 KB
testcase_23 AC 72 ms
71,316 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
change = {"l":"1","o":"0","a":"@","s":"$"}

num = [str(i) for i in range(10)]
mark = ["@","$"]
alp = [chr(ord("a")+i) for i in range(26)]

ans = set()

n = len(S)

def dfs(ind,s):
    global ans
    if ind == n:
        ok = sum([x in num for x in s])
        ok *= sum([x in mark for x in s])
        ok *= sum([x in alp for x in s])
        if ok:
            ans.add(s)
        return


    x = S[ind]
    dfs(ind+1,s+x)


    if x in change:
        dfs(ind+1,s+change[x])

    return

dfs(0,"")
print(len(ans))
0