#include <string>
#include <cstring>
#include <iostream>
#include <cstdio>
using namespace std;
int n;
char en(char a,char b)
{
int t = (int)(a + b - 'a'-'a') - n + 26;
t %= 26;
return (char)t + 'a';
}
int main()
{
scanf("%d",&n);
char str[10000];
getchar();
gets(str);
for(int i = 0;i < strlen(str); i++)
{
if(str[i] == ' ')
{
printf(" ");
i++;
}
if(i + 1 >= strlen(str))
{
break;
}
if(str[i+1] == ' '){
continue;
}
printf("%c",en(str[i],str[i + 1]));
i++;
}
printf("\n");
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1676 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |