On Electronic Island, numbers factory problem is solved, return the smallest number such that the product of its digits is equal to a given number.
The key point to solve it is that it the problem is that the number given should be divided by digit always. So if one miss in the proccess, just return 0.