The product of all digits of positive integer M is 105. How many such Ms are there with four digits?
The prime factorization of 105 is: 5 x 7 x 3
Because there are only 3 prime factors, the 4th digit must be a 1. This makes for 4 possible M's
....building on this great answer there are 4 * 3 * 2 possibles = 24
5731
5713
5173
5137
7531
7513
etc .....