handsomemaker @ 2019-07-04 17:42:29
我实在不知道哪错了 测试点看不了 大佬们帮帮忙啊
#include<iostream>
using namespace std;
int main() {
char a[200];
int n;
cin >> n;
cin >> a;
for (int i = 0; a[i]; i++) {
int x = a[i];
if (x >= 26 && x <= 122) {
if (n > 26) {
do { n -= 26; } while (n > 26);
}
if (x + n > 122) {
int p = n - (122 - x);
int m = p + 96;
char n = m;
cout << n;
}
else {
int m = x + 1;
char p = m;
cout << p;
}
}
}
return 0;
}