下载测试点#3后
标准输入
26
qwertyuiopasdfghjklzxcvbnm
标准输出
qwertyuiopasdfghjklzxcvbnm
我的输出
媤ertyuiopasdfghjklzxcvbnm
?
#include <iostream>
#include <cstring>
using namespace std;
int main() {
char a[101];
long long unsigned int b, c;
cin >> b >> a;
for (long long unsigned int i = 0; i < strlen(a); i++) {
if (c + b <= 122) {
c = a[i];
c += b;
a[i] = c;
} else {
c = a[i];
c += b;
c -= 26;
a[i] = c;
}
}
for (long long unsigned int i = 0; i < strlen(a); i++) {
cout << a[i];
}
}