80,求助大佬

P1914 小书童——凯撒密码

sygzzyr @ 2019-07-03 17:53:10

include<iostream>

include<cstdio>

include<cstring>

using namespace std; int main() { char c1[100],c2[100]; int n,i=0,l;

scanf("%d%s",&n,c1);
n%=26;
l=strlen(c1);
for(i=0;i<l;i++)
{
    c2[i]=c1[i]+n;
    if(c2[i]>'z')
        c2[i]-=26;
    printf("%c",c2[i]); 
}
return 0;

}


by infinities @ 2019-07-03 18:41:34

for(int i=0;i<n;i++){
            in[j]++;
            if(in[j]>'z')in[j]='a';//逐位累加再判断
        }cout<<in[j];

by infinities @ 2019-07-03 18:41:54

这样就没问题了


by infinities @ 2019-07-03 18:41:58

@sygzzyr


by infinities @ 2019-07-03 18:43:59

好了不说了我先去解决作业了

不然我可能会被活活打死


by sygzzyr @ 2019-07-03 18:44:05

@装弱是种美德 是吼,大佬就是大佬(佩服)


by infinities @ 2019-07-03 18:44:57

@sygzzyr 哪里哪里,是您过谦了


by infinities @ 2019-07-03 18:45:12

溜了~~


by sygzzyr @ 2019-07-03 18:47:47

@装弱是种美德 拜拜,大佬也要加油解决作业呀~


by infinities @ 2019-07-03 18:49:57

rt


by infinities @ 2019-07-03 18:50:34

while(1)NOIP2019 RP++,score++;


上一页 | 下一页