초기 정답

최종 정답
import java.util.*;
class Solution {
public int[] solution(int[] array, int[][] commands) {
int[] returnN = new int[commands.length];
for(int y=0 ;y<commands.length;y++) {
int i = commands[y][0]-1;
int j = commands[y][1];
int k = commands[y][2]-1;
int [] temp = Arrays.copyOfRange(array, i, j);
Arrays.sort(temp);
returnN[y] = temp[k];
}
return returnN;
}
}
SELECT o.ANIMAL_ID, o.NAME FROM ANIMAL_OUTS o LEFT JOIN ANIMAL_INS i WHERE o.ANIMAL_ID = i.ANIMAL_ID
SELECT o.ANIMAL_ID, o.NAME FROM ANIMAL_OUTS o LEFT JOIN ANIMAL_INS i ON o.ANIMAL_ID = i.ANIMAL_ID WHERE i.ANIMAL_ID IS NULL
class Solution {
public String solution(int[] food) {
StringBuilder answer = new StringBuilder();
for(int i=1;i<food.length;i++) {
int count= food[i] /2;
for(int j=0;j<count;j++) {
answer.append(i);
}
}
String left = answer.toString();
return left + "0" + answer.reverse().toString();
}
}