What is the largest five-digit integer whose digits have a product equal to the product $(7)(6)(5)(4)(3)(2)(1)$?
I need to find a five-digit integer that has the same product of digits as 7 factorial, which is 5040. I want the digits to be as large as possible, so I will start with 9 and see how many times it divides 5040. 5040 divided by 9 is 560, so I can use 9 as the first digit. Now I have 560 left to distribute among the other four digits. 560 divided by 8 is 70, so I can use 8 as the second digit. Now I have 70 left to distribute among the last three digits. 70 divided by 7 is 10, so I can use 7 as the third digit. Now I have 10 left to distribute among the last two digits. 10 divided by 5 is 2, so I can use 5 as the fourth digit. Now I have 2 left for the last digit, which is easy. The last digit is 2. 