結果

問題 No.2201 p@$$w0rd
ユーザー 👑 KazunKazun
提出日時 2023-02-03 21:25:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 158 ms / 2,000 ms
コード長 824 bytes
コンパイル時間 1,485 ms
コンパイル使用メモリ 87,304 KB
実行使用メモリ 81,744 KB
最終ジャッジ日時 2023-09-15 16:45:40
合計ジャッジ時間 5,502 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 153 ms
81,412 KB
testcase_01 AC 157 ms
81,644 KB
testcase_02 AC 156 ms
81,736 KB
testcase_03 AC 157 ms
81,528 KB
testcase_04 AC 156 ms
81,520 KB
testcase_05 AC 154 ms
81,508 KB
testcase_06 AC 156 ms
81,288 KB
testcase_07 AC 155 ms
81,680 KB
testcase_08 AC 155 ms
81,476 KB
testcase_09 AC 154 ms
81,744 KB
testcase_10 AC 156 ms
81,656 KB
testcase_11 AC 155 ms
81,636 KB
testcase_12 AC 156 ms
81,688 KB
testcase_13 AC 155 ms
81,500 KB
testcase_14 AC 155 ms
81,696 KB
testcase_15 AC 156 ms
81,456 KB
testcase_16 AC 155 ms
81,548 KB
testcase_17 AC 154 ms
81,416 KB
testcase_18 AC 156 ms
81,452 KB
testcase_19 AC 158 ms
81,548 KB
testcase_20 AC 157 ms
81,396 KB
testcase_21 AC 158 ms
81,704 KB
testcase_22 AC 156 ms
81,284 KB
testcase_23 AC 155 ms
81,436 KB
権限があれば一括ダウンロードができます

ソースコード

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