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<cstdio>
#include<cassert>
#include<cstring>
#include<map>
#include<set>
#include<time.h>
#include<algorithm>
#include<stack>
#include<queue>
#include<utility>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<limits>
using namespace std;
long long gcd( long long b, long long s ){
return (s!=0) ? gcd( s, b%s ) : b;
}
char s[105];
int main(){
int n;
scanf("%d", &n);
bool isStart = 0;
while( ~scanf("%s", s) ){
int l = strlen ( s );
if( !isStart )
isStart = 1;
else
printf(" ");
if( l & 1 ) l--;
for(int i=0; i<l; i+=2)
printf("%c", 'a'+((s[i]-'a') + (s[i+1]-'a') + 26 - n)%26);
}
puts("");
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |