You are given a string password.
The strength of the password is calculated based on the following rules:
'a' to 'z').'A' to 'Z').'0' to '9')."!@#$".Each character contributes at most once, even if it appears multiple times.
Return an integer denoting the strength of the password.
Example 1:
Input: password = "aA1!"
Output: 11
Explanation:
'a', 'A', '1' and '!'.strength = 1 + 2 + 3 + 5 = 11.Example 2:
Input: password = "bbB11#"
Output: 11
Explanation:
'b', 'B', '1' and '#'.strength = 1 + 2 + 3 + 5 = 11.
Constraints:
1 <= password.length <= 105password consists of lowercase and uppercase English letters, digits, and special characters from "!@#$".