text = 'killshadow'
key = 'adsfkndcls'
flag = ''
v3 = 0
v5 = len(key)
for i in range(len(text)):
if text[i] == ' ':
flag = text[i]
else: # text都是小写字母,原代码中加了97,所以可以判断原来的字符都是大写
for j in range(ord("A"), ord("Z") + 1): #ord("") 字符返回相应的ASCII码
if (j - 39 - ord(key[v3 % v5]) + 97) % 26 + 97 == ord(text[i]):
flag = flag + chr(j) #chr() ASCII码返回字母
v3 += 1
break
print(flag)
KLDQCUDFZO