이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <cstdio>
#include <algorithm>
using namespace std;
char line[1024];
int main(){
int n;
fgets(line, sizeof(line), stdin);
sscanf(line,"%d",&n);
fgets(line, sizeof(line), stdin);
int sm = 0, cn = 0;
for(int i = 0; line[i] != '\0'; i++) {
if (line[i] == ' ' || line[i] == '\n' || line[i] == '\r') {
if (line[i] == '\n' || line[i] == '\r') break;
sm = 0;
cn = 0;
printf("%c", line[i]);
} else {
sm += line[i]-'a';
cn++;
if (cn == 2) {
printf("%c", (sm+26-n)%26+'a');
cn = sm = 0;
}
}
}
puts("");
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |