My youngest daughter received a card game named Sleeping Queens for Christmas this year, and has been playing it nearly non-stop since opening it.
You are dealt five cards, most of which have numbers 1-10 on them. There are other cards, but for now we will just deal with the numbers. You can discard cards in any of three different methods and draw that many new cards:
Write a MATLAB script that will tell you how how many different ways you can discard cards in your hand.
For example, if your hand had the cards [1 2 2 4 9], you could discard
so your script would output 8. Likewise, a hand of [1 2 2 2 6] would allow you discard cards 9 different ways:
So the output of your script for [1 2 2 2 6] should be 9. We don't need to know what the possible combinations are to discard just yet; we just need to know how many there are. Good luck, and happy hunting!