This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
/*
* v.cpp
*
* Created on: 2014. 9. 28.
* Author: minque
*/
#include <iostream>
//#include <cstdio>
#include <cstring>
using namespace std;
int main(){
int n, len, i, cnt=0;
char enc[102];
cin>>n;
while(cin>>enc){
if(cnt++) cout<<' ';
len = strlen(enc);
for(i = 0; i+1 < len; i+=2){
cout<<(char)((enc[i]-'a' + enc[i+1]-'a' - n)%26+'a');
}
}
cout<<endl;
return 0;
}
/*Sample
2
axcexseg yzkansuqe mlssltqu
*/
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |