← Back to List

2703번: Cryptoquote ↗

Solutions

Python 3
215 B | 215 chars
for _ in range(int(input())):
    a=input()
    r=input()
    for i in a:
        if ord('A') <= ord(i) <= ord('Z'):
            print(r[ord(i)-ord('A')],end="")
        else:
            print(i,end="")
    print()