明月别枝惊鹊,清风半夜鸣蝉。
稻花香里说丰年,听取WA声一片。
#include <iostream>
#include <cstring>
using namespace std;
int main() {
int n;
char str[100];
cin >> n >> str;
for (int i = 0; i < strlen(str); i++) {
str[i] += n;
if (str[i] >= 'z') str[i] -= 26;
}
cout << str;
return 0;
}
洛谷:40
jyshare:Time limit exceeded
toolhelper:对于测试点3,编译失败。