Submission #9600

# Submission time Handle Problem Language Result Execution time Memory
9600 2014-09-28T07:33:46 Z YesUjam Veni, vidi, vici (kriii2_V) C++
0 / 4
0 ms 1084 KB
#include <cstdio>
#include <cstring>

int main() {
	int n, i=0;
	char temp[111111], *tok, str[103];
	scanf("%d", &n);
	getchar();
	gets(temp);
	tok = strtok(temp, " ");
	while(tok != NULL) {
		strcpy(str, tok);
		int len = strlen(str);
		for(int i=0; i<len; i++) {
			char y = str[i];
			i++;
			if(i == len) break;
			char z = str[i];
			char x = y-'a'+z-'a'-n;
			if(x >= 26) x %= 26;
			while(x<0) {
				x+=26;
			}
			printf("%c", x+'a');
		}
		printf(" ");
		tok = strtok(NULL, " ");
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1084 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -