class Solution {
public String[] solution(String[] picture, int k) {
String[] answer = {};
return answer;
}
}
import java.util.*;
class Solution {
public String[] solution(String[] picture, int k) {
List<String> list = new ArrayList<>();
for (int i = 0; i < picture.length; i++) {
String[] enlarge = picture[i].split("");
String str = "";
for (int j = 0 ; j < enlarge.length; j++) {
str += enlarge[j].repeat(k);
}
for (int j = 0; j < k; j++) {
list.add(str);
}
}
String[] answer = new String[list.size()];
answer = list.toArray(answer);
return answer;
}
}
class Solution {
public String[] solution(String[] picture, int k) {
String[] answer = new String[picture.length * k];
int idx = 0;
for (int i = 0; i < picture.length; i++) {
for (int j = 0; j < k; j++) {
StringBuilder sb = new StringBuilder();
for (int l = 0; l < picture[i].length(); l++) {
sb.append(String.valueOf(picture[i].charAt(l)).repeat(k));
}
answer[idx++] = sb.toString();
}
}
return answer;
}
}