Skip to content

Files

Latest commit

author
Shuo
Nov 27, 2021
cb30580 · Nov 27, 2021

History

History

minimum-factorization

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Nov 27, 2021
Nov 12, 2019
Nov 12, 2019

< Previous                  Next >

Given a positive integer a, find the smallest positive integer b whose multiplication of each digit equals to a.

If there is no answer or the answer is not fit in 32-bit signed integer, then return 0.

Example 1
Input:

48 
Output:
68

Example 2
Input:

15

Output:

35

Related Topics

[Math] [Greedy]