X3B0A1 @ 2019-11-22 20:45:07
#include<iostream>
#include<cstring>
using namespace std;
int main() {
string str;
int l;
cin >>l>>str;
for(int i = 0;i < str.length();i++)
if(str[i]=='z'){
str[i] ='a';
str[i]+=l-1;
} else{
str[i] +=l;
}
cout << str;
return 0;
}
by Vector_ @ 2019-11-22 20:49:55
l可能会大于26的2333取个模就好了
l%=26;
by Vector_ @ 2019-11-22 21:22:26
而且可能是y右移2位什么的而不只是z
by X3B0A1 @ 2019-11-24 20:15:40
@Vector_ 谢谢,知道了