웅재의 코딩세상
[프로그래머스] 문자열 겹쳐쓰기 본문
- 풀이
#include <string>
#include <vector>
using namespace std;
string solution(string my_string, string overwrite_string, int s) {
for(int i=0; i < overwrite_string.size(); i++){
my_string[i+s] = overwrite_string[i];
}
return my_string;
}
반응형
'코딩테스트 > 프로그래머스 - LV 0' 카테고리의 다른 글
[프로그래머스] 문자 리스트를 문자열로 변환하기 (0) | 2024.01.22 |
---|---|
[프로그래머스] 문자열 섞기 (1) | 2024.01.22 |
[프로그래머스] 홀짝 구분하기 (0) | 2024.01.22 |
[프로그래머스] 문자열 돌리기 (0) | 2024.01.22 |
[프로그래머스] 덧셈식 출력하기 (0) | 2024.01.22 |