Submission #9500

#TimeUsernameProblemLanguageResultExecution timeMemory
9500effservVeni, vidi, vici (kriii2_V)C++98
1 / 4
0 ms1088 KiB
/* 문제 */ // 2014. #include <cstdio> #include <cmath> #include <algorithm> #include <vector> #include <queue> #include <functional> #include <cstring> #include <string> #include <map> using namespace std; int n; char str[200]; char ans[200]; bool tmp = false; int main() { scanf("%d", &n); while (~scanf("%s", str)) { if (tmp == true) { printf(" "); } int len = strlen(str); int pos = 0; for (int i = 0; i < len/2; i++) { char s = ((str[i * 2 + 0] - 'a' + str[i * 2 + 1] - 'a') - n); ans[pos++] = (s >= 0?s:26+s) % 26 + 'a'; } printf("%s", ans); tmp = true; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...