Submission #9263

# Submission time Handle Problem Language Result Execution time Memory
9263 2014-09-28T05:08:38 Z eternalklaus Veni, vidi, vici (kriii2_V) C++
0 / 4
0 ms 1672 KB
/*
 * 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
1 Correct 0 ms 1672 KB Output is correct
2 Correct 0 ms 1672 KB Output is correct
3 Correct 0 ms 1672 KB Output is correct
4 Correct 0 ms 1672 KB Output is correct
5 Correct 0 ms 1672 KB Output is correct
6 Correct 0 ms 1672 KB Output is correct
7 Incorrect 0 ms 1672 KB Output isn't correct
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -