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 <stdio.h>
#include <iostream>
#include <string>
using namespace std;
int main()
{
int n;
string a;
scanf("%d", &n);
getc(stdin);
getline(cin, a);
for(int i = 0 ; i < a.length()+1 ; i+=2){
if(a.length()-1 < i+1) break;
if(a[i] == 32){i++;printf(" ");}
else if(a[i+1] == 32){printf(" ");continue;}
printf("%c",(a[i] - 97 + a[i+1] -97 - n)%26 + 97);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |