Given two non-negative integers n and p, return the number of base-10 numbers with n digits and with the digit product equal to p
Example:
Input: n = 3, p = 6
Output: 9
Explanation: [
123,
132,
213,
231,
312,
321,
116,
161,
611
]
Notes:n <= 12
Walkthroughs of the solution. Try the steps first, then watch to compare approaches.
Free plan: 30 tutor messages. PRO is unlimited.
Saved
Ctrl + Enter to check
