結果
問題 |
No.2201 p@$$w0rd
|
ユーザー |
|
提出日時 | 2023-02-03 23:20:10 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 47 ms / 2,000 ms |
コード長 | 527 bytes |
コンパイル時間 | 248 ms |
コンパイル使用メモリ | 81,824 KB |
実行使用メモリ | 63,104 KB |
最終ジャッジ日時 | 2024-07-02 21:25:33 |
合計ジャッジ時間 | 1,966 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
S = input() change = {"l":"1","o":"0","a":"@","s":"$"} num = [str(i) for i in range(10)] mark = ["@","$"] alp = [chr(ord("a")+i) for i in range(26)] ans = set() n = len(S) def dfs(ind,s): global ans if ind == n: ok = sum([x in num for x in s]) ok *= sum([x in mark for x in s]) ok *= sum([x in alp for x in s]) if ok: ans.add(s) return x = S[ind] dfs(ind+1,s+x) if x in change: dfs(ind+1,s+change[x]) return dfs(0,"") print(len(ans))