题解 | 凯撒加密
凯撒加密
https://www.nowcoder.com/practice/006b7917d3784371a43cfbae01a9313d
n = int(input())
str = input()
re = ""
for char in str:
m = ord(char)
m = m+n
while m > 122:
m = m - 26
re += chr(m)
print(re)
凯撒加密
https://www.nowcoder.com/practice/006b7917d3784371a43cfbae01a9313d
n = int(input())
str = input()
re = ""
for char in str:
m = ord(char)
m = m+n
while m > 122:
m = m - 26
re += chr(m)
print(re)
相关推荐