No.2201 p@$$w0rd
Problem Statement
DHMO is trying to create a new account on a shopping site.
Passwords on the shopping site may use only lowercase half-width English letters, digits, and symbols.
A password can be registered if it is at least $8$ characters long and contains at least $1$ character each of lowercase half-width English letters, digits, and symbols.
DHMO has a string $S$ of $8$ lowercase half-width English letters that he always uses as his password.
DHMO came up with the idea of registering by replacing some of the characters of $S$ as follows.
- Replace
lwith the digit1 - Replace
owith the digit0 - Replace
awith the symbol@ - Replace
swith the symbol$
There are several replacement patterns; find how many of them can be registered on the shopping site.
Input
$S$
Constraints
- $|S|=8$
- $S$ consists of lowercase English letters only
Output
Output the number of replacement patterns that can be registered on the shopping site.
Print a newline at the end.
Sample
Sample 1
Input
password
Output
7
The $7$ patterns that can be registered are pas$w0rd, pa$sw0rd, pa$$w0rd, p@ssw0rd, p@s$w0rd, p@$sw0rd, and p@$$w0rd.
As an aside, passwords like these are extremely dangerous, so never use them.
Sample 2
Input
assassin
Output
0
There are several replacement patterns, but none of them contains a digit.
Sample 3
Input
qwertyui
Output
0
In some cases, no character can be replaced with a digit or a symbol.
Sample 4
Input
sayhello
Output
21
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
H20