#include <iostream> #include <cstdio> #include <string> #include <algorithm> using namespace std; /** * 密码翻译--北京大学 * @return */ int main() { string str; //本题输入的一行字符串,所以要用getline( ) while (getline(cin, str)) { for (int i = 0; i < str.size(); ++i) { if (str[i] == 'z' || str[i] == 'Z') { str[i] -= 25; } else if (('a' <= str[i] && str[i] <= 'y') || ('A' <= str[i] && str[i] <= 'Y')) { str[i] += 1; } } cout << str << endl; } return 0; }