PROGRAMMERS 43165: 타겟 넘버
Link : programmers.co.kr/learn/courses/30/lessons/43165 Python 더보기 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 counter = 0 def DFS(numbers, target, deapth, length): global counter if deapth == length: if sum(numbers) == target: counter += 1 else: numbers[deapth] *= -1 DFS(numbers, target, deapth + 1, length) numbers[deapth] *= -1 DFS(numbers, target, deapth + 1, length) def solution(numbers, ta..
2021. 1. 5.