이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |