백준알고리즘 2675번 java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int tc = sc.nextInt(); String text[] = new String[tc]; int count[] = new int[tc]; for (int i = 0; i < tc; i++) { count[i] = sc.nextInt(); text[i] = sc.next(); } for (int j = 0; j < tc; j++) { char[] temp = text[j].toCharArray(); for (int k = 0; k < temp.length; k++) { for (int l = 0; l < count[j]; l++) { System.out.print(temp[k]); } } System.out.println(); } } }
'SW > 백준알고리즘' 카테고리의 다른 글
백준알고리즘 10039번 java (0) | 2017.09.13 |
---|---|
백준알고리즘 11654번 java (0) | 2017.09.13 |
백준알고리즘 10809번 java (0) | 2017.09.13 |
백준알고리즘 1152번 java (0) | 2017.09.13 |
백준알고리즘 1157번 java (0) | 2017.09.13 |