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)
'알고리즘 문제 풀기 > Codeup' 카테고리의 다른 글
Codeup 1296 - 직사각형의 최대 넓이 (0) | 2019.02.15 |
---|---|
Codeup 1295 - 알파벳 대소문자 변환 (0) | 2019.02.15 |
Codeup 1293 - 1등과 꼴등 (0) | 2019.02.14 |
Codeup 1292 - 범인을 잡아라 1 (0) | 2019.02.13 |
Codeup 1291 - 바이러스 백신 (0) | 2019.02.13 |