#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;
}
# |
결과 |
실행 시간 |
메모리 |
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 |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |