728x90
반응형

단순 문자열 문제이다.

for _ in range(int(input())):
    a, b = map(int, input().split())
    s = input()
    res = ''.join([chr(ord('A') + ((ord(c)-ord('A'))*a + b)%26) for c in s])
    print(res)
728x90
반응형

+ Recent posts