2025-08-24 13:46:58 +0300 MSK
Smallest Divisible Digit Product I
Links
Code
class Solution:
def smallestNumber(self, n: int, t: int) -> int:
while True:
cur = n
prd = 1
while cur > 0:
prd *= cur % 10
if prd == 0:
break
cur //= 10
if prd % t == 0:
return n
n += 1