• + 0 comments

    Here is my Python solution using list comprehensions! The first list is all the digits that are not 0, and the second list is all the numbers in that list that evenly divide the number. We then return the length of that list, which is the amount of numbers that work.

    def findDigits(n):
        digits = [int(digit) for digit in str(n) if int(digit) != 0]
        return len([digit for digit in digits if n % int(digit) == 0])