#3348
Smallest Divisible Digit Product II
grandmaster · 2300 · lc hard +32 · 14.5% accepted · 57 likes · top 0%
Description
You are given a string num representing a positive integer, and an integer t.
A number is zero-free if none of its digits is 0.
Return a string representing the smallest zero-free number greater than or equal to num whose digit product is divisible by t. If no such number exists, return "-1".
Code
1
2
3