qwe1471900575 @ 2021-02-23 01:27:31
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int n;
char a[110];
cin >> n >> a;
int k = n % 26;
for (int i = 0; a[i] != '\0'; i++)
{
a[i] = a[i] + k;
if (a[i] > 122)
{
a[i] = a[i] - 122 + 96;
}
printf("%c", a[i]);
}
return 0;
}
by FCB_1899 @ 2021-02-23 07:16:38
@qwe1471900575 你这个错误很玄学,可以试试
25
x
这个,运算时产生了负数
by 1108zy @ 2021-04-23 19:03:55
@liuxingjian 这是为什么呢