wcwrcxx @ 2024-11-18 19:13:15
#include<stdio.h>
int main(void){
int n,i=0,b;
scanf("%d",&n);
char a[55],ch;
getchar();
scanf("%c",&ch);
while(ch!='\n'){
a[i]=ch;
i++;
scanf("%c",&ch);
}
for(b=0;b<i;b++){
if(a[b]<=122-n) a[b]=a[b]+n;
else a[b]=a[b]+n-26;
printf("%c",a[b]);
}
return 0;
}
by Terrible @ 2024-11-18 19:23:27
请注意洛谷某些题目测试点数据不以 \n
结尾。
测试记录均反馈 RE 233,可见没有测试点以 \n
结尾。