結果
| 問題 | No.2201 p@$$w0rd |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-02-04 10:38:04 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 46 ms / 2,000 ms |
| コード長 | 927 bytes |
| コンパイル時間 | 156 ms |
| コンパイル使用メモリ | 82,520 KB |
| 実行使用メモリ | 62,148 KB |
| 最終ジャッジ日時 | 2024-07-03 09:16:45 |
| 合計ジャッジ時間 | 2,043 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
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))