結果

問題 No.2201 p@$$w0rd
ユーザー tassei903tassei903
提出日時 2023-02-04 10:38:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 83 ms / 2,000 ms
コード長 927 bytes
コンパイル時間 536 ms
コンパイル使用メモリ 87,060 KB
実行使用メモリ 76,436 KB
最終ジャッジ日時 2023-09-16 07:41:57
合計ジャッジ時間 3,706 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
76,188 KB
testcase_01 AC 79 ms
76,348 KB
testcase_02 AC 76 ms
76,240 KB
testcase_03 AC 80 ms
76,184 KB
testcase_04 AC 77 ms
76,416 KB
testcase_05 AC 76 ms
76,368 KB
testcase_06 AC 80 ms
76,148 KB
testcase_07 AC 78 ms
76,204 KB
testcase_08 AC 78 ms
76,304 KB
testcase_09 AC 77 ms
76,280 KB
testcase_10 AC 79 ms
76,248 KB
testcase_11 AC 78 ms
75,896 KB
testcase_12 AC 80 ms
76,388 KB
testcase_13 AC 77 ms
76,264 KB
testcase_14 AC 78 ms
76,212 KB
testcase_15 AC 78 ms
76,244 KB
testcase_16 AC 78 ms
76,300 KB
testcase_17 AC 78 ms
76,180 KB
testcase_18 AC 78 ms
76,284 KB
testcase_19 AC 78 ms
76,236 KB
testcase_20 AC 78 ms
76,236 KB
testcase_21 AC 80 ms
76,176 KB
testcase_22 AC 83 ms
76,436 KB
testcase_23 AC 78 ms
76,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################
s = input()
ans = set()
n = len(s)
for p in range(1<<n):
    t = list(s)
    for i in range(n):
        if p >> i & 1 and s[i] == "l":
            t[i] = "1"
        if p >> i & 1 and s[i] == "o":
            t[i] = "0"
        if p >> i & 1 and s[i] == "a":
            t[i] = "@"
        if p >> i & 1 and s[i] == "s":
            t[i] = "$"
    a,b,c = 0, 0,0
    for i in range(n):
        if t[i] in "1234567890":
            c += 1
        if t[i] in "@$":
            a +=1 
    t = "".join(t)
    if 0 < c and 0 < a and a + c < n:
        ans.add(t)
print(len(ans))
0