백준 19942
[백준 19942번-파이썬] 다이어트
http://acmicpc.net/problem/19942 {코드} def calculate(do, picked, pick_sum): global chosen, tot_prc if pick_sum[4] >= tot_prc: return for i in range(4): if req_nut[i] > pick_sum[i]: break else: chosen = picked.copy() tot_prc = pick_sum[4] return if do == n: return picked.append(do+1) for i in range(5): pick_sum[i] += nuts[do][i] calculate(do+1, picked, pick_sum) picked.pop() for i in range(5): pic..