$\text{What is the number of ways to form }24\text{ using }7,2,\text{ and }3,\text{ zero or more times?}$
We can write $24$ as $7a+3b+2c$ . Since $\lfloor\frac{24}{7}\rfloor = 3,$ $\lfloor\frac{24}{3}\rfloor = 8$ and $\lfloor\frac{24}{2}\rfloor = 12$ ,We can say $0 \le a \le 3$ , $0 \le b \le 8$ and $0 \le c \le 12$.Then I put $a = 0,1,2,3$ and I got $11$ ways.
They are
$1. 7*3+ 2*0 +3*1$
$2. 7*2+ 2*5+ 3*0$
$3. 7*2+ 2*2 +3*2$
$4. 7*1 +2*7+ 3*1$
$ 5. 7*1 +2*4 +3*3$
$ 6. 7*1+ 2*1+ 3*5$
$ 7. 7*0+ 2*12 +3*0$
$8. 7*0 +2*9 +3*2$
$9. 7*0+ 2*6+ 3*4$
$10. 7*0 +2*3+ 3*6$
$11. 7*0 +2*0 +3*8$
Is there any efficient way of calculating this kind of problem??