Given a string password, compute its total strength score.
The total strength is the sum of the values contributed by each distinct character in password, according to the following scoring rules:
Each distinct lowercase English letter contributes
Each distinct uppercase English letter contributes
Each distinct digit contributes
Each distinct special character from "!@#$" contributes
Return an integer representing the total strength of password.
Constraints:
password.length
password consists of lowercase and uppercase English letters, digits, and special characters from "!@#$".
Given a string password, compute its total strength score.
The total strength is the sum of the values contributed by each distinct character in password, according to the following scoring rules:
Each distinct lowercase English letter contributes
Each distinct uppercase English letter contributes
Each distinct digit contributes
Each distinct special character from "!@#$" contributes
Return an integer representing the total strength of password.
Constraints:
password.length
password consists of lowercase and uppercase English letters, digits, and special characters from "!@#$".