strs=input() strlist=[] a1=['a','b','c','A','B','C'] a2=['d','e','f','F','D','E'] a3=['g','h','i','G','H','I'] a4=['j','k','l','L','K','J'] a5=['m','n','o','M','N','O'] a6=['p','q','r','s','P','Q','R','S'] a7=['v','t','u','V','T','U'] a8=['w','x','y','z','X','Y','Z','W'] for i in range(len(strs)):     if strs[i] in a1:         strlist.append('2')     elif strs[i] in a2:         strlist.append('3')     elif strs[i] in a3:         strlist.append('4')     elif strs[i] in a4:         strlist.append('5')     elif strs[i] in a5:         strlist.append('6')     elif strs[i] in a6:         strlist.append('7')     elif strs[i] in a7:         strlist.append('8')     elif strs[i] in a8:         strlist.append('9') print(''.join(strlist))
点赞 评论

相关推荐

牛客网
牛客企业服务