P1914 小书童——凯撒密码
#include <bits/stdc++.h>
using namespace std;
int n;
string s;
int main() {
cin >> n >> s;
for (int i = 0; i < s.size(); i++) {
int c = s[i] + n;
if (c > 'z') c = c - 'z' - 1 + 'a';
s[i] = c;
}
cout << s << endl;
return 0;
}