#include <iostream>
#include <string>
#include <cstdio>
using namespace std;
int main() {
string str;
while (getline(cin, str)) { // 注意 while 处理多个 case
if (str == "ENDOFINPUT") {
break;
}
getline(cin, str);
//'A' 是 65
//'Z' 是 90
for (int i = 0; i < str.size(); i++) {
if (str[i] >= 'A' && str[i] <= 'Z') {
str[i] -= 5;
if (str[i] < 65) {
str[i] = str[i] + 26;
}
}
}
cout << str << endl; //endl加个换行的意思
getline(cin, str); //结束符
}
}
// 64 位输出请用 printf("%lld")
用c风格的输入不行,被迫采用c++风格

京公网安备 11010502036488号