#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;
}
else if(S[i+1]==0)break;
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 |
1 |
Correct |
0 ms |
1096 KB |
Output is correct |
2 |
Correct |
0 ms |
1096 KB |
Output is correct |
3 |
Correct |
0 ms |
1096 KB |
Output is correct |
4 |
Correct |
0 ms |
1096 KB |
Output is correct |
5 |
Correct |
0 ms |
1096 KB |
Output is correct |
6 |
Correct |
0 ms |
1096 KB |
Output is correct |
7 |
Incorrect |
0 ms |
1096 KB |
Output isn't correct |
8 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |