[Help] DP Digit about the number multiplied by its digits !!

Revision en1, by _LNHTD_, 2021-05-17 13:21:52

Given $L,R (1 \leq L \leq R \leq 10^{18})$.

Count how many number $n=\overline{d_1d_2...d_k}$ that have $Q = n * d_1 * d_2 * \dots * d_k$ and $L \leq Q \leq R.$

I have done some calculation and found out that there are about $40000$ to $60000$ different possible product of digits: $d_1 * d_2 * \dots * d_k$. But I don't know any possible algorithm at all. Please help me! Thanks <3.

#### History

Revisions

Rev. Lang. By When Δ Comment
en1 _LNHTD_ 2021-05-17 13:21:52 450 Initial revision (published)