Huawei OD Computer Test Real Questions-Password Decryption-2023 OD Unified Examination (Paper C)

Topic description:

Given a "ciphertext" string s, in which the characters are mapped by the "ciphertext", it is now necessary to decrypt the "ciphertext" and output it
   The mapping rules ('a'-'i') are represented by ('1'-'9') respectively; (& #39;j'-'z') are represented by ('10*'-'26*') respectively
   Constraint: Mapping is always unique

Enter description:

"ciphertext" string

Output description:

plain text string

Additional instructions:

The length of the translated text is within 100 characters

Example 1

enter:

20*19*20*

Output:

tst

illustrate:

while True:
    a='a b c d e f g h i j k l m n o p q r s t u v w x y z'.split()
    '''try:
        s=input().strip()
        news=[]
        if '*' in s: 
            s=list(s[::-1])
            for i in range(len(s)-2):
                if s[i]=='*':
                    news.append(''.join(s[i:i+3]))
                if i >=

Guess you like

Origin blog.csdn.net/2301_76848549/article/details/135031942