結果
問題 | No.2201 p@$$w0rd |
ユーザー |
![]() |
提出日時 | 2023-02-09 21:45:40 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 29 ms / 2,000 ms |
コード長 | 574 bytes |
コンパイル時間 | 81 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-07-06 22:33:35 |
合計ジャッジ時間 | 1,451 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
s = input()n = len(s)from itertools import productans = []for state in product([0,1],repeat=n):t = [c for c in s]nums = 0symbols = 0chars = nfor i in range(n):if state[i]:if t[i] == 'l' or t[i] == 'o':t[i] = '0'nums += 1chars -= 1elif t[i] == 'a' or t[i] == 's':t[i] = '$'symbols += 1chars -= 1if nums > 0 and symbols > 0 and chars > 0:ans.append(''.join(t))ans = set(ans)print(len(ans))