問題一覧 > 通常問題

No.2201 p@$$w0rd

レベル : / AI推定難易度 : 450 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 171
作問者 : H20 / テスター : 👑 p-adic
お気に入りにしたユーザー ProblemId : 9097 / 自分の提出
問題文最終更新日: 2023-01-27 22:41:23
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 375 (順位表) の他の問題:

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 l with the digit 1
  • Replace o with the digit 0
  • Replace a with the symbol @
  • Replace s with 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もしくは右上の雲マークをクリックしてアカウントを作成してください。