题解 | 字符串加密

while True:
    try:
        s,t = input(),input()
        A = 'abcdefghijklmnopqrstuvwxyz'
        qc_s = ''
        jm_t = ''
        for i in s:
            if i not in qc_s:
                qc_s += i
        for a in A:
            if a not in qc_s:
                qc_s += a
        for i in t:
            jm_t += qc_s[A.index(i)]
        print(jm_t)
    except:
        break

全部评论

相关推荐

10-14 12:20
门头沟学院 Java
迷茫的大四🐶:摊牌了,我是25届的,你们也不招我
点赞 评论 收藏
分享
牛至超人:把哈工大,再加大加粗,看见闪闪发光的哈工大字样,面试官直接流口水
投递字节跳动等公司10个岗位
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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