[프로그래머스] 배열 만들기 5

Seah Lee·2023년 6월 26일
0

프로그래머스

목록 보기
39/57

import java.util.ArrayList;

class Solution {
    public ArrayList<Integer> solution(String[] intStrs, int k, int s, int l) {
        ArrayList<Integer> answer = new ArrayList<Integer>();
        
        for(int i=0;i<intStrs.length;i++){
            int tmp = Integer.parseInt(intStrs[i].substring(s,s+l));
            if (tmp>k) answer.add(tmp);
        }
        
        return answer;
    }
}

다들 이렇게 푸는구만

profile
성장하는 개발자

0개의 댓글