
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int testCase = sc.nextInt();
for(int i = 0; i < testCase; i++) {
int R = sc.nextInt();
String S = sc.next();
for(int j = 0; j < S.length(); j++) {
for(int k = 0; k < R; k++) {
System.out.print(S.charAt(j));
}
}
System.out.println();
}
}
}
'Algorithm > Baekjoon' 카테고리의 다른 글
[백준_JAVA] 2908 상수 (0) | 2023.07.22 |
---|---|
[백준_JAVA] 1152 단어의 개수 (0) | 2023.07.17 |
[백준_JAVA] 10809 알파벳 찾기 (0) | 2023.07.14 |
[백준_JAVA] 11720 숫자의 합 (0) | 2023.07.14 |
[백준_JAVA] 11654 아스키 코드 (1) | 2023.07.01 |