This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
#include <string.h>
char S[10210];
int N,K;
int main()
{
int i,a,b,c;
scanf("%d ",&K);
gets(S);
N=strlen(S);
for(i=0;i<N;i++){
if(S[i]==' '){
printf(" ");
continue;
}
else if(S[i+1]==' '){
i++;
printf(" ");
continue;
}
a=S[i]-'a';b=S[i+1]-'a';
c=(a+b-K)%26+'a';
printf("%c",c);
i++;
}
printf("\n");
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |