Submission #9410

# Submission time Handle Problem Language Result Execution time Memory
9410 2014-09-28T06:12:17 Z Yoon Veni, vidi, vici (kriii2_V) C++
0 / 4
0 ms 1108 KB
#include <stdio.h>
#include <string.h>
char S[20010];
int N,K;
int main()
{
	int i,a,b,c;
	scanf("%d ",&K);
	gets(S);
	N=strlen(S);
	for(i=0;i<N;i++){
		if(S[i]==' '){
			printf(" ");
			continue;
		}
		else if(S[i+1]==' '){
			i++;
			printf(" ");
			continue;
		}
		else if(S[i+1]==0)break;
		a=S[i]-'a';b=S[i+1]-'a';
		c=(a+b-K)%26+'a';
		printf("%c",c);
		i++;
	}
	printf("\n");
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1108 KB Output is correct
2 Correct 0 ms 1108 KB Output is correct
3 Correct 0 ms 1108 KB Output is correct
4 Correct 0 ms 1108 KB Output is correct
5 Correct 0 ms 1108 KB Output is correct
6 Correct 0 ms 1108 KB Output is correct
7 Incorrect 0 ms 1108 KB Output isn't correct
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -