結果

問題 No.2201 p@$$w0rd
ユーザー hibit_athibit_at
提出日時 2023-02-09 21:45:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 18 ms / 2,000 ms
コード長 574 bytes
コンパイル時間 68 ms
コンパイル使用メモリ 10,912 KB
実行使用メモリ 8,152 KB
最終ジャッジ日時 2023-09-21 03:54:39
合計ジャッジ時間 1,458 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,068 KB
testcase_01 AC 16 ms
7,972 KB
testcase_02 AC 17 ms
7,996 KB
testcase_03 AC 17 ms
8,044 KB
testcase_04 AC 18 ms
7,996 KB
testcase_05 AC 17 ms
8,048 KB
testcase_06 AC 17 ms
8,060 KB
testcase_07 AC 17 ms
8,096 KB
testcase_08 AC 16 ms
8,080 KB
testcase_09 AC 17 ms
8,068 KB
testcase_10 AC 17 ms
8,032 KB
testcase_11 AC 17 ms
8,044 KB
testcase_12 AC 17 ms
8,028 KB
testcase_13 AC 16 ms
8,152 KB
testcase_14 AC 16 ms
7,976 KB
testcase_15 AC 17 ms
8,092 KB
testcase_16 AC 16 ms
7,960 KB
testcase_17 AC 16 ms
7,968 KB
testcase_18 AC 16 ms
8,096 KB
testcase_19 AC 16 ms
8,036 KB
testcase_20 AC 16 ms
8,120 KB
testcase_21 AC 17 ms
8,040 KB
testcase_22 AC 16 ms
8,084 KB
testcase_23 AC 17 ms
7,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()

n = len(s)

from itertools import product

ans = []

for state in product([0,1],repeat=n):
    t = [c for c in s]
    nums = 0
    symbols = 0
    chars = n
    for i in range(n):
        if state[i]:
            if t[i] == 'l' or t[i] == 'o':
                t[i] = '0'
                nums += 1
                chars -= 1
            elif t[i] == 'a' or t[i] == 's':
                t[i] = '$'
                symbols += 1
                chars -= 1
    if nums > 0 and symbols > 0 and chars > 0:
        ans.append(''.join(t))

ans = set(ans)
print(len(ans))
0