题解 | #字符串加密#

字符串加密

https://www.nowcoder.com/practice/e4af1fe682b54459b2a211df91a91cf3

k = list(input())
s = input()
lst = []
small = [chr(i) for i in range(ord('a'), ord('z') + 1)]
for i in k + small:
    if i not in lst:
        lst.append(i)
res = ''
for i in s:
   ind = small.index(i)
   res += lst[ind]
print(res)

全部评论

相关推荐

昨天 12:22
门头沟学院 Java
点赞 评论 收藏
分享
Gaynes:查看图片
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务