Playground/자바문제집

[백준] 2675번

미숫가루설탕많이 2023. 1. 22. 21:58
import java.util.*;
import java.io.*;
import java.math.*;

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 count = sc.nextInt();
         String data = sc.next();

         for (int j = 0; j < data.length(); j++) {
            for (int k = 0; k < count; k++) {
               System.out.print(data.charAt(j));
            }
         }
         System.out.println();
      }
   }
}

'Playground > 자바문제집' 카테고리의 다른 글

[백준] 2908번  (0) 2023.01.22
[백준] 2742번  (0) 2023.01.22
[백준] 2577번  (0) 2023.01.22
[백준] 1271번  (0) 2023.01.22
[백준] 2475번  (0) 2023.01.22