본문 바로가기
C++

[프로그래머스] 문자열 섞기

by 띰쥬 2025. 8. 27.
728x90
반응형
SMALL

#include <string>
#include <vector>

using namespace std;

string solution(string str1, string str2) {
    string answer = "";
    
     for(int i=0; i < str1.length(); i++)
     {
         answer.push_back(str1.at(i));
         answer.push_back(str2.at(i));
     }
    return answer;
}

728x90
반응형
LIST

댓글