题解 | #句子反转#
简单密码
http://www.nowcoder.com/practice/7960b5038a2142a18e27e4c733855dac
while True:
try:
str_ = input()
string = ''
for s in str_:
if s.isupper():
if s == "Z":
s = 'a'
else:
s = chr(ord(s.lower())+1)
elif s.islower():
if s == 's' or s == 'v' or s == 'y' or s == 'z':
s = str((ord(s) - ord('a')) // 3 + 1)
else:
s = str((ord(s) - ord('a')) // 3 + 2)
string += s
print(string)
except:
break