https://www.acmicpc.net/problem/2675
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int T = Integer.parseInt(br.readLine()); // 테스트 케이스 개수
for(int i=0;i<T;i++){
String[]str =br.readLine().split(" ");
int R = Integer.parseInt(str[0]); // 반복 횟수
String S = str[1]; // 문자열
for(int j=0;j<S.length();j++){
for(int k=0;k<R;k++){
System.out.print(S.charAt(j));
}
}
System.out.println();
}
}
}코드를 입력하세요