結果

問題 No.2201 p@$$w0rd
ユーザー kenshi4041kenshi4041
提出日時 2023-02-03 22:13:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 834 bytes
コンパイル時間 377 ms
コンパイル使用メモリ 87,104 KB
実行使用メモリ 76,768 KB
最終ジャッジ日時 2023-09-15 18:10:59
合計ジャッジ時間 3,390 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
76,428 KB
testcase_01 AC 80 ms
76,680 KB
testcase_02 AC 79 ms
76,552 KB
testcase_03 AC 80 ms
76,660 KB
testcase_04 AC 79 ms
76,568 KB
testcase_05 AC 80 ms
76,356 KB
testcase_06 AC 77 ms
76,692 KB
testcase_07 AC 81 ms
76,652 KB
testcase_08 AC 81 ms
76,684 KB
testcase_09 AC 79 ms
76,692 KB
testcase_10 AC 80 ms
76,656 KB
testcase_11 AC 79 ms
76,332 KB
testcase_12 AC 80 ms
76,760 KB
testcase_13 AC 79 ms
76,636 KB
testcase_14 AC 80 ms
76,692 KB
testcase_15 AC 80 ms
76,768 KB
testcase_16 AC 80 ms
76,336 KB
testcase_17 AC 80 ms
76,680 KB
testcase_18 AC 81 ms
76,588 KB
testcase_19 AC 81 ms
76,276 KB
testcase_20 AC 79 ms
76,588 KB
testcase_21 AC 80 ms
76,720 KB
testcase_22 AC 79 ms
76,676 KB
testcase_23 AC 81 ms
76,440 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()
n = len(s)
ss = []
for i in range(2 ** n):
    l = [i >> j & 1 for j in range(n)]
    new_s = list(s)
    for j in range(n):
        if l[j] == 1:
            if new_s[j] == "l":
                new_s[j] = "1"
            elif new_s[j] == "o":
                new_s[j] = "0"
            elif new_s[j] == "a":
                new_s[j] = "@"
            elif new_s[j] == "s":
                new_s[j] = "$"
    ss.append("".join(new_s))

ans = []
for i in ss:
    alpha_f = False
    num_f = False
    kigou_f = False
    for j in range(n):
        if i[j] == "1" or i[j] == "0":
            num_f = True
        elif i[j] == "@" or i[j] == "$":
            kigou_f = True
        else:
            alpha_f = True
    
    if alpha_f == True and num_f == True and kigou_f == True:
        ans.append(i)

print(len(set(ans)))
0