A collection contains only -unit coins and -unit coins. There are coins altogether, worth in total.
How many coins of each kind are there?
Absorb the count condition into the variable. If is the number of -unit coins, the rest of the coins must be -unit coins:
This is why the problem needs only one equation rather than a system.
Write each group's value.
Set up the value equation.
Expand, combine, solve.
Read off both counts and check. There are five-unit coins and ten-unit coins. Value:
A useful sanity check: if all coins were s the total would be , and every swap of a for a adds . Needing extra means tens — the same answer by a different route.
Need to solve a different problem like this? Open the solver →