[Huawei OD test questions] The longest password (python) 100% pass rate super detailed code comment code optimization

[Huawei OD machine test real questions 2022&2023] real test catalog @click here @
[Huawei OD machine test real questions] signal transmission and reception & trial reading & @click here @
[Huawei OD machine real test questions] rent a car to ride the greenway & trial reading & @点here@

Find password (longest password)

Knowledge point tree
Time limit: 1s Space limit: 32MB Limited language: unlimited

Title description:

Xiao Wang is playing a big game, and there is a level that needs to enter a password to pass. The conditions for obtaining the password are as follows: In a password book, each page has a password composed of 26 lowercase letters, and the passwords of each page are different. It is necessary to find such a longest password from the code book. Starting from the end of it, the new password obtained by removing one bit in turn also exists in the codebook. Please output the passwords that meet the requirements, if there are multiple passwords that meet the requirements, return a dictionary

Guess you like

Origin blog.csdn.net/weixin_45541762/article/details/130672787