python 3 solution, analysis digit by digit
\nclass Solution:\n    def getNoZeroIntegers(self, n: int) -> List[int]:\n        #\n        A,B,i = 0,0,0\n        \n        if n < 10: return n-1,1\n        \
```\nclass Solution:\n    def getNoZeroIntegers(self, n: int) -> List[int]:\n        #\n        A,B,i = 0,0,0\n        \n        if n < 10: return n-1,1\n        \n        while n >= 10:\n            digit = n%10\n            n = n//10\n            if digit <= 1:\n                A += (digit+1)*10**i\n                B += 9*10**i\n                n = n-1\n            else:\n                B += (digit-1)*10**i\n                A += 1*10**i\n            i += 1\n        \n        B += n*10**i\n        \n        return A,B\n```
['Python', 'Python3']