So I am working on a project for my government class that involves Electoral Math for the US Elections. We are trying to find all the ways X candidate can win an election by getting to 270 Votes. We start with a number that lists how many states they are expected to win and a baseline number. Then we have a list of 20 states that we list as battleground that each have an amount of votes associated. What I want to do is find every combination of those 20 states that gets me to 270. How do I do this knowing that it's not a permutation since I don't care if it's listed as Ohio, Florida or Florida, Ohio and that I want to stop as soon as we hit 270.