题解 | #未完成试卷数大于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='')
全部评论

相关推荐

牛客44320985...:你的当务之急是把这个糖的要死的沟槽ide主题改了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务