Find the number of x-digit numbers whose product of digits is N Given two numbers \$N\$ and \$x\$, find the number of \$x\$-digit numbers whose product of digits is \$N\$
\$N &lt;10^6\$ and \$x &lt;12\$
Sample Input (N x):
8 3
Sample Output:
10
Golfscript 42 31

~10\?.10/\,&gt;{10base{*}*1$=},,\;


Input: Expects the numbers N and x as command line arguments (separated by space).

The program can be tested here.