Lv2

    [프로그래머스, Python] 광물 캐기

    정답 코드 def solution(picks, minerals): ans = [] tired = [[1, 1, 1], [5, 1, 1], [25, 5, 1]] tools = {"diamond" : 1, "iron": 2, "stone": 3} def dfs(minerals, picks, tired_rate): # 종료 조건 if sum(picks) == 0 or minerals == []: ans.append(tired_rate) return m = minerals[:5] # tool 을 picks에서 감소 for t in range(3): if picks[t] > 0: picks[t] -= 1 tired_rate_val = tired_rate_calculate(t, m) dfs(minerals[5:],..