class Solution:
    def selfDividingNumbers(self, left, right):
        """
        :type left: int
        :type right: int
        :rtype: List[int]
        """
        def istrue(num):
            strnum=str(num)
            n=len(strnum)
            for i in range(n):
                if int(strnum[i])==0:
                    return False
                elif num%int(strnum[i])!=0:
                    return False
            return True
        ans=[]
        for i in range(left,right+1):
            if istrue(i):
                ans.append(i)
        return ans
s=Solution()
left=1
right=22
print(s.selfDividingNumbers(left,right))



