题解 | #进制转换#
简单密码
http://www.nowcoder.com/practice/7960b5038a2142a18e27e4c733855dac
dic = {'2': 'abc', '3': 'def', '4': 'ghi', '5': 'jkl', '6': 'mno', '7': 'pqrs', '8': 'tuv', '9': 'wxyz'} str = input() out = [] for i in str: if i.isdigit(): out.append(i) elif i.islower(): for key in dic: if i in dic[key]: out.append(key) break elif i.isupper(): if i == 'Z': i = 'a' out.append(i) else: i = chr(ord(i.lower()) + 1) out.append(i)
print(''.join(out))