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>
int n;
char S[105];
int main() {
scanf("%d", &n);
bool first = 1;
while (scanf("%s", S) != EOF) {
if (!first) printf(" ");
first = 0;
int L = strlen(S);
for (int i = 0; i < L - 1; i += 2) {
int x = ((S[i] - 'a') + (S[i + 1] - 'a') - n) % 26;
if (x < 0) x += 26;
printf("%c", (char)('a' + x));
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |