题解 | 凯撒加密

凯撒加密

https://www.nowcoder.com/practice/006b7917d3784371a43cfbae01a9313d

#include <stdio.h>
#include<string.h>
int main() 
{
    int n;
    char s[1001];
    scanf("%d %s",&n,s);
    int t=strlen(s);
    for(int i=0;i<t;i++)
    {
        s[i]=(s[i]-'a'+n)%26+'a';
    }
    printf("%s",s);
    return 0;
}

全部评论

相关推荐

joecii:如果没有工资,那可能没有工资是这家公司最小的问题了
找实习记录
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务