본문 바로가기

Programming [Python]/백준 알고리즘 솔루션

#334 백준 파이썬 [5598] 카이사르 암호

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

 

PYTHON CODE

original = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
revised = 'DEFGHIJKLMNOPQRSTUVWXYZABC'
string = input()

for i in string:
    print(original[revised.index(i)], end ='') #위치로 찾아줌