Written by
java-style
on
on
[프로그래머스] Level2 _43165번: 타겟 넘버 (JAVA)
[프로그래머스] Level2 _43165번: 타겟 넘버 (JAVA)
728x90
문제
https://programmers.co.kr/learn/courses/30/lessons/43165
풀이코드
package seohae.algorithm.level2; import java.util.Arrays; /** * https://programmers.co.kr/learn/courses/30/lessons/43165 */ public class Lesson_052_43165 { static int targetValue; static int cnt; static int[] arr; static int[] sign; public static void main(String[] args) { Lesson_052_43165 lesson = new Lesson_052_43165(); int[] a = new int[]{1,1,1,1,1}; System.out.println(lesson.solution(a, 3)); } public int solution(int[] numbers, int target) { targetValue = target; arr = numbers; sign = new int[arr.length]; for (int i = 0; i
from http://devfunny.tistory.com/510 by ccl(A) rewrite - 2021-09-29 19:01:24