This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main()
{
int n;
cin >> n;
char in[100200];
gets(in);
int len = strlen(in), bp = 0;
in[len] = ' ';
in[len+1] = '\n';
len++;
for(int i=0; i<len; i++)
{
if(in[i] == ' ') bp++;
}
int end = 0;
for(int i=0; i<len; i+=2)
{
if(in[i] == ' ')
{
i--;
cout << " ";
}
else if(in[i+1] == ' ')
{
cout << " ";
}
else cout << char(((in[i]-'a')+(in[i+1]-'a') - n) % 26 + 'a');
}
cout << endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |