본문 바로가기
코딩테스트 연습/프로그래머스 Lv.0

프로그래머스 코딩테스트 lv.0 - n 번째 원소까지. 자바/JAVA

by 트레비봄 2023. 8. 20.
728x90
문제 설명

소스 코드
class Solution {
    public int[] solution(int[] num_list, int n) {
        int[] answer = new int[n];
        
        for(int i = 0; i<n; i++){
            answer[i] = num_list[i];
        }
        return answer;
    }
}
728x90