結果

問題 No.2201 p@$$w0rd
ユーザー Hydru
提出日時 2023-02-03 21:30:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 49 ms / 2,000 ms
コード長 841 bytes
コンパイル時間 185 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 59,776 KB
最終ジャッジ日時 2024-07-02 19:14:26
合計ジャッジ時間 1,971 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

S=input()

now=[""]
for s in S:
    next=[]
    if s=="l":
        for t in now:
            next.append(t+"l")
            next.append(t+"1")
    elif s=="o":
        for t in now:
            next.append(t+"o")
            next.append(t+"0")
    elif s=="a":
        for t in now:
            next.append(t+"a")
            next.append(t+"@")
    elif s=="s":
        for t in now:
            next.append(t+"s")
            next.append(t+"$")
    else:
        for t in now:
            next.append(t+s)
    now=next

chr_set=set(chr(i+97) for i in range(26))

numb_set=set(str(i) for i in range(10))



ans=0
for X in now:
    flag=[0,0,0]
    for t in X:
        if t in chr_set:
            flag[0]=1
        elif t in numb_set:
            flag[1]=1
        else:
            flag[2]=1
    if flag==[1,1,1]:
        ans+=1

print(ans)
0