Score : $500$ points
For how many positive integers at most $N$ is the product of the digits at most $K$?
Input is given from Standard Input in the following format:
$N$ $K$
Print the number of integers satisfying the condition.
13 2
5
Out of the positive integers at most $13$, there are five such that the product of the digits is at most $2$: $1$, $2$, $10$, $11$, and $12$.
100 80
99
Out of the positive integers at most $100$, all but $99$ satisfy the condition.
1000000000000000000 1000000000
841103275147365677
Note that the answer may not fit into a $32$-bit integer.