标签:tco for col form solution += ret bsp while
1 class Solution: 2 def addToArrayForm(self, A, K): 3 i = len(A) - 1 4 while i >= 0 and K > 0: 5 A[i] += K 6 K = A[i] // 10 7 if A[i] >= 10: 8 A[i] %= 10 9 if i == 0: 10 A = [0] + A 11 i += 1 12 i -= 1 13 return A 14
标签:tco for col form solution += ret bsp while
原文地址:https://www.cnblogs.com/asenyang/p/10359152.html