STBU_RLZ @ 2018-12-14 10:17:11
#include <stdio.h>
int main()
{
char ch[55];
int n,i;
scanf("%d",&n);
getchar();
gets(ch);
for(i=0;ch[i]!='\0';i++)
{
ch[i]+=n;
if(ch[i]>'z')
ch[i]=ch[i]-'z'+'a'-1;
}
for(i=0;ch[i]!='\0';i++)
putchar(ch[i]);
return 0;
}
大佬求解,开始直接puts也是错的
by STBU_RLZ @ 2018-12-14 10:17:43
@Range 在线IDE-洛谷
by wuzhaoxin @ 2018-12-14 10:22:25
@Range 关于gets,它死了
by edjzy @ 2019-01-01 16:54:59
@Range
gets会把回车录进去