题解 | #字符串加密#
字符串加密
http://www.nowcoder.com/practice/e4af1fe682b54459b2a211df91a91cf3
while True:
try:
a =input()
b = input()
str1 = ''
str2 = 'abcdefghijklmnopqrstuvwxyz'
str3 =''
l = []
for x in a:
if x not in str1:
str1+=x
for x in str2:
if x not in str1:
str3 += x
str4 = str1+str3
for x in b:
l.append(str2.index(x))
for i in range(len(l)):
print(str4[l[i]],end='')
except:
break
	
   try:
a =input()
b = input()
str1 = ''
str2 = 'abcdefghijklmnopqrstuvwxyz'
str3 =''
l = []
for x in a:
if x not in str1:
str1+=x
for x in str2:
if x not in str1:
str3 += x
str4 = str1+str3
for x in b:
l.append(str2.index(x))
for i in range(len(l)):
print(str4[l[i]],end='')
except:
break
 查看7道真题和解析
查看7道真题和解析
