#include<stdio.h>
#include<string.h>
int N;
char buf[105];
char newbuf[105];
int main()
{
scanf("%d",&N);
while(scanf("%s", buf) == 1){
int k = 0, x;
int len = strlen(buf);
for(int i = 1; i < len; i+=2){
x = (int(buf[i]) + buf[i-1] - N -'a' - 'a') % 26;
newbuf[k] = x + 'a';
k++;
newbuf[k] = 0;
}
printf("%s ",newbuf);
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1088 KB |
Output is correct |
2 |
Correct |
0 ms |
1088 KB |
Output is correct |
3 |
Correct |
0 ms |
1088 KB |
Output is correct |
4 |
Correct |
0 ms |
1088 KB |
Output is correct |
5 |
Correct |
0 ms |
1088 KB |
Output is correct |
6 |
Correct |
0 ms |
1088 KB |
Output is correct |
7 |
Incorrect |
0 ms |
1088 KB |
Output isn't correct |
8 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |