这题错在哪
字符串加解密
http://www.nowcoder.com/questionTerminal/2aa32b378a024755a3f251e75cbf233a
while True: try: def jiami(s): new1='' for i in s: if i in 'ABCDEFGHIJKLMNOPQRSTUVWXY': new1+=chr(ord(i)+32+1) elif i in 'abcdefghijklmnopqrstuvwxy': new1+=chr(ord(i)-32+1) elif i=='z': new1+='B' elif i=='Z': new1+="a" elif i in '012345678': new1+=str(int(i)+1) elif i =='9': new1+='0' else: new1+=i return new1 def jiema(c): new2='' for i in c: if i in 'BCDEFGHIJKLMNOPQRSTUVWXYZ': new2+=chr(ord(i)+32-1) elif i in 'bcdefghijklmnopqrstuvwxyz': new2+=chr(ord(i)-32-1) elif i=='A': new2+='z' elif i=='a': new2+='Z' elif i in '123456789': new2+=str(int(i)-1) elif i=='0': new2+='9' else: new2+=i return new2 s1=input() s2=input() print(jiami(s1)) print(jiema(s2)) except: break
总是30%。。请问大佬们我这到底哪错了。。。