이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <stdio.h>
#include <string>
using namespace std;
int main()
{
int N;
scanf("%d",&N);
char buf[200];
while(scanf("%s",buf)!=-1)
{
string str = buf;
string res = "";
if(str.length()%2 == 1)
{
str = str.substr(0,str.length()-1);
}
while(!str.empty())
{
char y = str[0] - 'a';
char z = str[1] - 'a';
str = str.substr(2);
char x ='a'+ (26+y+z-N)%26;
res.push_back(x);
}
printf("%s ",res.c_str());
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |