Submission #9360

# Submission time Handle Problem Language Result Execution time Memory
9360 2014-09-28T05:54:19 Z jwvg0425 Veni, vidi, vici (kriii2_V) C++
0 / 4
0 ms 1088 KB
#include<stdio.h>
#include<string.h>

int main(void)
{
	char string[20000];
	int n;
	int length;

	scanf("%d\n", &n);
	gets(string);
	
	length = strlen(string);

	for (int i = 0; i < length - 1; i+=2)
	{

		if (string[i] == ' ' || string[i + 1] == ' ')
		{
			printf(" ");

			if (string[i] == ' ')
				i = i - 1;

			continue;
		}

		printf("%c", 'a' + ((string[i] - 'a' + string[i + 1] - 'a'-n)%26));
	}

	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1088 KB Output is correct
2 Correct 0 ms 1088 KB Output is correct
3 Correct 0 ms 1088 KB Output is correct
4 Correct 0 ms 1088 KB Output is correct
5 Correct 0 ms 1088 KB Output is correct
6 Correct 0 ms 1088 KB Output is correct
7 Incorrect 0 ms 1088 KB Output isn't correct
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -