알고리즘 문제 풀기/Codeup
Codeup 1294 - 씨저의 암호 2
bug_maker
2019. 2. 14. 13:03
http://codeup.kr/problem.php?id=1294
Codeup 1294 - 씨저의 암호 2
text = input()
password = ''
for i in range(0, len(text)):
if text[i] == ' ':
password += text[i]
elif ord(text[i]) > 119:
if text[i] == 'x':
password += 'a'
elif text[i] == 'y':
password += 'b'
elif text[i] == 'z':
password += 'c'
else:
code = ord(text[i]) + 3
password += chr(code)
print(password)