#P10906. [蓝桥杯 2024 国 B] 合法密码

[蓝桥杯 2024 国 B] 合法密码

Problem Description

Xiaolan is developing his own OJ website. He requires that users' passwords must satisfy the following conditions:

  1. The length is at least 88 characters and at most 1616 characters.
  2. It must contain at least 11 digit character and at least 11 symbol character.

For example, lanqiao2024!, +-*/0601, and 8((>w<))8 are all valid passwords.

However, 12345678, ##**##**, abc0!#, and lanqiao20240601!? are not valid passwords.

Please calculate, in the following string, how many substrings can be used as valid passwords. As long as the starting character and ending character positions of two substrings in the original string are different, they are considered different substrings.

The string is:

kfdhtshmrw4nxg#f44ehlbn33ccto#mwfn2waebry#3qd1ubwyhcyuavuajb#vyecsycuzsmwp31ipzah#catatja3kaqbcss2th

Input Format

This is an output-only fill-in-the-blank problem. You only need to compute the result and submit it. The result of this problem is an integer. When submitting the answer, only fill in this integer. Filling in any extra content will result in no score.

Output Format

This is an output-only fill-in-the-blank problem. You only need to compute the result and submit it. The result of this problem is an integer. When submitting the answer, only fill in this integer. Filling in any extra content will result in no score.

Hint

Translated by ChatGPT 5