题解 | #字符串加密#

字符串加密

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

全部评论

相关推荐

活泼的代码渣渣在泡池...:哈哈哈挺好的,我也上岸美团了,不说了,我又接了一单
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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