結果

問題 No.2201 p@$$w0rd
ユーザー meruuu61779999meruuu61779999
提出日時 2023-02-03 21:30:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 151 ms / 2,000 ms
コード長 1,012 bytes
コンパイル時間 1,258 ms
コンパイル使用メモリ 87,100 KB
実行使用メモリ 80,432 KB
最終ジャッジ日時 2023-09-15 16:56:54
合計ジャッジ時間 4,986 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 148 ms
79,812 KB
testcase_01 AC 149 ms
79,860 KB
testcase_02 AC 147 ms
79,808 KB
testcase_03 AC 146 ms
80,148 KB
testcase_04 AC 150 ms
80,096 KB
testcase_05 AC 145 ms
80,076 KB
testcase_06 AC 150 ms
80,092 KB
testcase_07 AC 148 ms
79,940 KB
testcase_08 AC 147 ms
80,136 KB
testcase_09 AC 149 ms
80,152 KB
testcase_10 AC 148 ms
80,172 KB
testcase_11 AC 148 ms
80,000 KB
testcase_12 AC 148 ms
80,332 KB
testcase_13 AC 148 ms
80,076 KB
testcase_14 AC 147 ms
80,052 KB
testcase_15 AC 149 ms
80,268 KB
testcase_16 AC 148 ms
80,076 KB
testcase_17 AC 147 ms
80,128 KB
testcase_18 AC 149 ms
80,144 KB
testcase_19 AC 151 ms
80,076 KB
testcase_20 AC 149 ms
79,940 KB
testcase_21 AC 149 ms
80,432 KB
testcase_22 AC 148 ms
80,308 KB
testcase_23 AC 147 ms
79,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import string

inputs = sys.stdin.readline


def main():
    S = input()
    aP = [S]
    for i, s in enumerate(S):
        bP, aP = aP, []
        if s == 'l':
            for p in bP:
                aP.append(p)
                aP.append(p[:i] + '1' + p[i + 1:])
        elif s == 'o':
            for p in bP:
                aP.append(p)
                aP.append(p[:i] + '0' + p[i + 1:])
        elif s == 'a':
            for p in bP:
                aP.append(p)
                aP.append(p[:i] + '@' + p[i + 1:])
        elif s == 's':
            for p in bP:
                aP.append(p)
                aP.append(p[:i] + '$' + p[i + 1:])
        else:
            aP = bP[:]

    alp = string.ascii_lowercase
    ans = 0
    for s in aP:
        if '0' in s or '1' in s:
            if '@' in s or '$' in s:
                for al in alp:
                    if al in s:
                        ans += 1
                        break
    print(ans)


if __name__ == "__main__":
    main()
0