[Level 1, C++] 시저 암호


[Level 1, C++] 시저 암호

시저 암호는 유명한데 교양 보안 관련 수업에서도 나왔었다. 재밌는 암호화 방법인 것 같다. #include #include #include using namespace std; string solution(string s, int n) { string answer = ""; for (int i = 0; i < s.size(); i++) { if (s[i] == ' ') { answer.push_back(s[i]); } else { for (int u = 0; u < n; u++) { if (s[i] == 'z') { s[i] = 'a'; continue; } else if (s[i] == 'Z') { s[i] = 'A'; continue; } else { s[i] += 1; continue; } } an..


원문링크 : [Level 1, C++] 시저 암호