3622. Check Divisibility by Digit Sum and Product
You are given a positive integer
n. Determine whethernis divisible by the sum of the following two values:
- The digit sum of
n(the sum of its digits).- The digit product of
n(the product of its digits).Return
trueifnis divisible by this sum; otherwise, returnfalse.
1 | class Solution { |