Simple Python
\nclass Solution:\n    def addToArrayForm(self, A: \'List[int]\', K: \'int\') -> \'List[int]\':\n        A[-1] += K\n        i = len(A) - 1\n        while i > 0
```\nclass Solution:\n    def addToArrayForm(self, A: \'List[int]\', K: \'int\') -> \'List[int]\':\n        A[-1] += K\n        i = len(A) - 1\n        while i > 0 and A[i] > 9:\n            A[i-1] += A[i] // 10\n            A[i] = A[i] % 10\n            i -= 1\n        while A[0] > 9:\n            A = [A[0] // 10] + A\n            A[1] = A[1] % 10\n        return A\n```
[]