Input 1
2315313134 5234423114
Output 1
hello world
Input 2
112234
Output 2
ago
square = [list('abcde'),
list('fghik'),
list('lmnop'),
list('qrstu'),
list('vwxyz')]
inp = input()
strs = inp.split()
def decryptStr(str):
lst = list(str)
lst = [int(item) for item in lst]
answ = ''
for i in range(0, len(str), 2):
x = lst[i]
y = lst[i+1]
answ += square[x-1][y-1]
return answ
answ = ''
for i in strs:
answ += decryptStr(i)
answ += ' '
print(answ)
Comments
Leave a comment