結果

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

ソースコード

diff #

def check(X):
    from string import ascii_lowercase
    a=b=c=0

    for x in X:
        if x in ascii_lowercase:
            a+=1
        elif x=="@" or x=="$":
            c+=1
        else:
            b+=1
    return a!=0 and b!=0 and c!=0

def solve():
    from itertools import product

    S=input()

    E=set()
    for p in product([0,1], repeat=8):
        X=""
        for i in range(8):
            if not p[i]:
                X+=S[i]
            elif S[i]=="l":
                X+="1"
            elif S[i]=="o":
                X+="0"
            elif S[i]=="a":
                X+="@"
            elif S[i]=="s":
                X+="$"
            else:
                X+=S[i]

        if check(X):
            E.add(X)
    return len(E)

#==================================================
print(solve())
0