728x90
반응형
SMALL
#include <string>
#include <vector>
using namespace std;
string solution(string my_string, int k) {
string answer = "";
for(int i=0; i<k; i++)
answer.append(my_string);
return answer;
}
#include <string>
#include <vector>
using namespace std;
string solution(string my_string, int k) {
string answer = "";
for(int i=0; i<k; i++)
answer+=my_string;
return answer;
}
728x90
반응형
LIST
'C++' 카테고리의 다른 글
| [프로그래머스] 두 수의 연산값 비교하기 (0) | 2025.08.27 |
|---|---|
| [프로그래머스] 더 크게 합치기 (0) | 2025.08.27 |
| [프로그래머스] 문자 리스트를 문자열로 변환하기 (0) | 2025.08.27 |
| [프로그래머스] 문자열 섞기 (0) | 2025.08.27 |
| [프로그래머스] 문자열 겹쳐쓰기 (0) | 2025.08.26 |
댓글