WA4!!!!

P1914 小书童——凯撒密码

SAURYAUTUMN @ 2022-04-15 18:40:16

#include<stdio.h>
#include<string.h>
int main()
{
    int n;
    scanf("%d",&n);
    char ch[51];
    scanf("%s",ch);
    n=n%26;
    for(int j=0;j<strlen(ch);j++){

            ch[j] = ch[j]+n+1<=('a'+26) ? ch[j]+n : n-'z'-ch[j];

    }
        puts(ch);

    return 0;
}

|