백준 - (# 11655)

https://www.acmicpc.net/problem/11655


Code

s = input()
rot_13 = ''

for i in s:
    aski = ord(i)
    if 65 <= aski and aski <= 90:
        aski = ((aski - 65)+13)%26+65
    elif 97 <= aski and aski <= 122:
        aski = ((aski - 97)+13)%26+97
    rot_13 += chr(aski)

print(rot_13)

좋은 웹페이지 즐겨찾기