题解 | #未完成试卷数大于1的有效用户#
简单密码
http://www.nowcoder.com/practice/7960b5038a2142a18e27e4c733855dac
num= input()
for s in num:
if ord('A') <= ord(s) <= ord('Z'):
if s =='Z':
print('a',end='')
else:
print(chr(ord(s.lower())+1),end='')
elif ord('a') <= ord(s) <= ord('z'):
if s in 'abc':
print('2',end='')
elif s in 'def':
print('3',end='')
elif s in 'ghi':
print('4',end='')
elif s in 'jkl':
print('5',end='')
elif s in 'mno':
print('6',end='')
elif s in 'pqrs':
print('7',end='')
elif s in 'tuv':
print('8',end='')
else:
print('9',end='')
else:
print(s,end='')
for s in num:
if ord('A') <= ord(s) <= ord('Z'):
if s =='Z':
print('a',end='')
else:
print(chr(ord(s.lower())+1),end='')
elif ord('a') <= ord(s) <= ord('z'):
if s in 'abc':
print('2',end='')
elif s in 'def':
print('3',end='')
elif s in 'ghi':
print('4',end='')
elif s in 'jkl':
print('5',end='')
elif s in 'mno':
print('6',end='')
elif s in 'pqrs':
print('7',end='')
elif s in 'tuv':
print('8',end='')
else:
print('9',end='')
else:
print(s,end='')
