题解 | #字符串加密#

字符串加密

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

while 1:
    try:
        m=input()
        k=input()
        l=''
        for i in range(26):
            l+=chr(ord('a')+i)
        x=''
        for s in m:
            if s not in x:
                x+=s
        for i in l:
            if i not in x:
                x+=i
        an=''
        for i in k:
            an+=x[l.index(i)]
        print(an)
    except:
        break

全部评论

相关推荐

头像
点赞 评论 收藏
转发
点赞 收藏 评论
分享
牛客网
牛客企业服务