728x90
https://school.programmers.co.kr/learn/courses/30/lessons/120833?language=csharp
📝 나의 풀이
using System;
using System.Collections.Generic;
public class Solution {
public int[] solution(int[] numbers, int num1, int num2) {
List<int> list = new List<int>();
for(int i = num1; i <= num2; i++)
{
list.Add(numbers[i]);
}
int[] answer = list.ToArray();
return answer;
}
}
728x90
'코딩테스트 > [C#] 프로그래머스' 카테고리의 다른 글
[프로그래머스 | Lv.0] 최댓값 만들기(1) (0) | 2023.08.13 |
---|---|
[프로그래머스 | Lv.0] 문자열 뒤집기 (0) | 2023.08.13 |
[프로그래머스 | Lv.0] 머쓱이보다 키 큰 사람 (0) | 2023.08.13 |
[프로그래머스 | Lv.0] 자릿수 더하기 (0) | 2023.08.13 |
[프로그래머스 | Lv.0] 특정 문자 제거 (0) | 2023.08.13 |