提交时间:2025-12-05 15:48:32

运行 ID: 75347

#include <iostream> #include <string> using namespace std; string encrypt(const string& input) { string result; for (char c : input) { if (c >= 'a' && c <= 'y') { result += c + 1; } else if (c == 'z') { result += 'a'; } else if (c >= 'A' && c <= 'Y') { result += c + 1; } else if (c == 'Z') { result += 'A'; } else { result += c; } } return result; } int main() { string input; getline(cin, input); cout << encrypt(input) << endl; return 0; }