Submission #16520

#TimeUsernameProblemLanguageResultExecution timeMemory
16520hongjun7Veni, vidi, vici (kriii2_V)C++98
4 / 4
0 ms1084 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...