Talentd
FleetCode

625. Minimum Factorization

Medium34.2% acceptance1 companyPremium elsewhere, free here

Given a positive integer num, return the smallest positive integer x whose multiplication of each digit equals num. If there is no answer or the answer is not fit in 32-bit signed integer, return 0.

Example 1:

Input: num = 48
Output: 68

Example 2:

Input: num = 15
Output: 35

Constraints:

  • 1 <= num <= 231 - 1

Asked at 1 company

8:28
Still stuck?Read the written solution, or watch a walkthrough.
Open solution
Loading editor…
1class Solution:
2 def solve(self):
3 pass
4
Starter codePython 3Spaces: 4
Examples
Input
48
Input
15
Your code is saved on this device.Solution