結果

問題 No.2201 p@$$w0rd
ユーザー ShirotsumeShirotsume
提出日時 2023-02-03 23:06:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 162 ms / 2,000 ms
コード長 978 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 87,124 KB
実行使用メモリ 81,640 KB
最終ジャッジ日時 2023-09-15 19:19:38
合計ジャッジ時間 5,308 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 155 ms
80,888 KB
testcase_01 AC 162 ms
81,160 KB
testcase_02 AC 155 ms
81,252 KB
testcase_03 AC 157 ms
81,108 KB
testcase_04 AC 158 ms
81,224 KB
testcase_05 AC 160 ms
81,372 KB
testcase_06 AC 158 ms
81,156 KB
testcase_07 AC 158 ms
80,888 KB
testcase_08 AC 159 ms
81,200 KB
testcase_09 AC 157 ms
81,364 KB
testcase_10 AC 159 ms
81,512 KB
testcase_11 AC 155 ms
81,060 KB
testcase_12 AC 153 ms
80,900 KB
testcase_13 AC 160 ms
81,640 KB
testcase_14 AC 156 ms
81,052 KB
testcase_15 AC 157 ms
81,196 KB
testcase_16 AC 157 ms
81,204 KB
testcase_17 AC 154 ms
80,924 KB
testcase_18 AC 153 ms
80,944 KB
testcase_19 AC 156 ms
80,928 KB
testcase_20 AC 160 ms
81,276 KB
testcase_21 AC 154 ms
80,964 KB
testcase_22 AC 155 ms
80,924 KB
testcase_23 AC 154 ms
81,060 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import string
import sys
from collections import deque, Counter
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 63 - 1
mod = 998244353

s = input()

S1 = set(string.ascii_lowercase)
S2 = set('0123456789')
ans = set()
for bit in range(1 << len(s)):
    s2 = []
    for i in range(len(s)):
        if 1 & (bit >> i):
            if s[i] == 'l':
                s2.append('1')
            elif s[i] == 'o':
                s2.append('0')
            elif s[i] == 'a':
                s2.append('@')
            elif s[i] == 's':
                s2.append('$')
            else:
                s2.append(s[i])
        else:
            s2.append(s[i])
    s3 = [v for v in s2 if v in S1]
    s4 = [v for v in s2 if v in S2]
    s5 = [v for v in s2 if v not in S2 and v not in S1]
    if len(s3) > 0 and len(s4) > 0 and len(s5) > 0:
        ans.add(tuple(s2))
print(len(ans))
        
0