For example, 2222255555 and 5324855555 are both such numbers. By the way, this is an interview question, and thus I think there should be a not-too-complicated way to count it.
I'm sorry for that I didn't put what I've done here. Here is my thought for this problem:
Since the product ends in at least 5 zeros, the factorization of the product should contain at least $2^5 \times 5^5$, and each digit of the number shouldn't be zero. That's our starting point. Let's first consider there are exactly 5 fives in the number, and the remaining 5 digits should contain at least $2^5$. And the first case is that if all 5 digits are multiples of 2 (can be 2,4,6, or 8), the number of these numbers is ${10\choose 5}\times 4^5$. The second case is that if exactly 4 of the 5 digits are multiples of 2. But I'm stuck here, and can't find an easy way to continue my counting.
UPDATE:
I have provided a not-too-complicated way to solve this problem in the answer section, and also provide computer programs to verify the correctness of my method there. Hope these help you, and any other different methods are very welcome!
I have just figured out a way to continue my counting as follows:
That's all. Systematic and not-too-complicated.
UPDATE:
I have just written a simple Python program to verify the correctness of my method as follows:
And both functions will return the same number: $3994023$. FYI, because the Python version of the
brute_force()function is really slow (it took about 53mins to finish on my laptop!), I also wrote it in Go programming language as follows for you to verify my method much more quickly (it took less than 1min!):Hope these help you!