# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
9337 | dolpang2 | Veni, vidi, vici (kriii2_V) | C++14 | 0 ms | 1676 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <cstdio>
#include <iostream>
#include <string>
int main() {
int n = 0;
scanf(" %d", &n);
std::string word;
int count = 0;
while (std::cin >> word) {
std::string converted;
if (word.size() % 2 == 1) {
for (size_t i = 0; i < word.size() - 1; ++i) {
converted.push_back(word[i]);
}
} else {
converted = word;
}
std::string ret;
for (size_t i = 0; i < converted.size(); i += 2) {
char a = converted[i] - 'a';
char b = converted[i + 1] - 'a';
int c = (a + b - n + 26) % 26;
char d = c + 'a';
ret.push_back(d);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |