https://www.acmicpc.net/problem/2675
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int i = 0; i < t; i++) {
int r = sc.nextInt();
String s = sc.next();
String answer = "";
String[] arr = s.split(""); // 문자열.split("") -> 문자열 하나씩 배열에 저장
for(int j = 0; j < arr.length; j++){
answer += arr[j].repeat(r); // 반복한문자.repeat(반복횟수)
}
System.out.println(answer);
}
}
}