๋ธ๋ก ์ฆ1 : ๊ตฌํ ๋ฌธ์ ์ด๋ค.
ํ์ด
๋จ์ํ ๋ฌธ์ ์ด๋ค. ์๋ค์ ์ด๋ ํ ๋ฌธ์๋ฅผ ๋ฃ์ ์ ์์ผ๋, ํ์ฌ ๊ฐ์ง๊ณ ์๋ ROT13๋ง ๊ฐ์ง๊ณ ์ ๋ถ๋ถ์ ์ผ๋ก ๋ณด์์ ๋, ๊ฐ์ฅ ์์ ์ฐจ์ด๋ฅผ ๊ฐ์ง๊ณ ์๋ ์ง์ ๋ง ์๋ฉด๋๋ค. ์ดํ๋ ๋ง์ถฐ์ ๋ผ์๋ฃ์ผ๋ฉด ๋๋๊น.
Code
import string
a = input()
alphabet_lower = string.ascii_lowercase
alphabet_upper = string.ascii_uppercase
ret_string = ""
for char in a:
if char in alphabet_lower:
pos = alphabet_lower.find(char)
char = alphabet_lower[(pos + 13) % len(alphabet_lower)]
elif char in alphabet_upper:
pos = alphabet_upper.find(char)
char = alphabet_upper[(pos + 13) % len(alphabet_upper)]
ret_string += char
print(ret_string)