You have 40 different books: 20 math books, 15 history books, and 5 geography books. in how many different ways can you put the 40 books in a row on a shelf?
for the first place we have 40 books to choose from for the second place we have 39 books to choose from and so on. there is 40! ways to put the books in a row on a shelf