"수박" 문자열을 n/2 만큼 더해주고, 홀수면 끝에 추가적으로 "수"를 붙여준다.
#include <string>
#include <vector>
using namespace std;
string solution(int n) {
string answer = "";
bool is_odd = n & 1 ? true : false;
int end = n / 2;
for(int i=0; i<end; i++)
answer += "수박";
if(is_odd)
answer += "수";
return answer;
}