
Originally Posted by
MagiMaster
Imagine the first 15 answers are correct. That's one possibility. To get the rest, you could just rearrange the numbering of the questions so that questions 1-15 were correct. There are 20! (20 factorial) ways to rearrange 20 things, but that over counts things. You only care that the first 15 are correct, but not what order they're in. So you divide by the number of ways you can rearrange those first 15. But you also don't care what order the 5 incorrect ones are, so you also divide by the number of ways of rearranging those.
So, the final answer is 20! / (15! * 5!) = 15504 and this method will generalize to any number of things and categories. If you wanted the number of ways of arranging 5 red balls, 4 blue balls and 3 green balls, that'd be 12! / (5! * 4! * 3!).