Skip to content

Baekjoon 1718

1. Problem

문제 확인하기

2. Solution

text, key = input(), input()

ans = ''

for i in range(len(text)):
    if text[i] == ' ':
        ans += ' '
    else:
        ans += chr((ord(text[i]) - ord(key[i%len(key)]) - 1) % 26 + ord('a'))

print(ans)