MathsReadCompetitive mathematics
Algorithmic puzzle · integer answereasy25 min

Odd-value coin change

Dynamic Programming

How many UNORDERED multisets of coins with denominations 1,4,11,23 have total value exactly 137? Any number of each coin is allowed.

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.

Accepted format: a whole number such as 42 or 123456789. No commas, formulas, or source code.

How to approach this problem

Iterate through denominations on the outside and amounts in increasing order on the inside. Initialize the empty multiset at amount zero; this counts unordered combinations.

Worked example with different values

With coins 1 and 3, amount 5 has two multisets: five ones, or one three and two ones.

Apply the same reasoning to the challenge. This example is a separate practice problem.

Learn the technique: Dynamic programming and grid paths

Report a question or explanation issue

Back to problems →