题解 | #字符串加解密#
字符串加解密
http://www.nowcoder.com/practice/2aa32b378a024755a3f251e75cbf233a
in_str_1 = str(input()) in_str_2 = str(input()) out_str1 = "" out_str2 = "" for i in in_str_1: j = ord(i) if (65<=j<90): j+=33 elif j == 90: j = 97 elif 97<=j<122: j -= 31 elif j == 122: j = 65 elif 48<= j < 57 : j += 1 elif j ==57: j = 48 out_str1+=chr(j) print(out_str1) for i in in_str_2: j = ord(i) if (65<j<=90): j+=31 elif j == 65: j = 122 elif 97<j<=122: j -= 33 elif j == 97: j = 90 elif 48< j <= 57 : j -= 1 elif j ==48: j = 57 out_str2+=chr(j) print(out_str2)