Seven-number target subsets
Combinatorial Counting
How many distinct seven-element subsets of {1,2,...,24} have elements summing to exactly 100? Order within each subset does not matter.
Solve using mathematics, algorithms, or your own code offline. Submit only the final integer here—no program, expression, graph, or written proof.
Check your answer without signing in. Sign in to save your progress.
How to approach this problem
Maintain counts indexed by number of selected elements and total sum. For each candidate, update both indices downward so the element cannot be reused.
Worked example with different values
The two-element subsets of {1,2,3,4} with sum 5 are {1,4} and {2,3}; each is counted only once.
Apply the same reasoning to the challenge. This example is a separate practice problem.
Learn the technique: Dynamic programming and grid paths