题解 | 字符串加密
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
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
相关推荐