#include <iostream> #include <map> using namespace std; int main() { //利用 map 表来解析代码 map<char, char> ctoint; ctoint['a'] = '2';ctoint['b'] = '2';ctoint['c'] = '2'; ctoint['d'] = '3';ctoint['e'] = '3';ctoint['f'] = '3'; ctoint['g'] = '4';ctoint['h'] = '4';ctoint['i'] = '4'; ctoint['j'] = '5';ctoint['k'] = '5';ctoint['l'] = '5'; ctoint['m'] = '6';ctoint['n'] = '6';ctoint['o'] = '6'; ctoint['p'] = '7';ctoint['q'] = '7';ctoint['r'] = '7';ctoint['s'] = '7'; ctoint['t'] = '8';ctoint['u'] = '8';ctoint['v'] = '8'; ctoint['w'] = '9';ctoint['x'] = '9';ctoint['y'] = '9';ctoint['z'] = '9'; string str, ans; cin >> str; int len = str.length(); for(int i = 0; i < len; i++){ if(str[i] >= 'A' && str[i] <= 'Z'){ char c = tolower(str[i]); if(c == 'z'){ c = 'a'; }else{ c += 1; } ans.append(1, c); }else if(str[i] >= 'a' && str[i] <= 'z'){ ans.append(1, ctoint[str[i]]); }else{ ans.append(1, str[i]); } } cout << ans << endl; return 0; } // 64 位输出请用 printf("%lld")