class Solution:
# @param digits, a list of integer digits
# @return a list of integer digits
def plusOne(self, digits):
carry=1
for i in range(len(digits)-1,-1,-1):
digits[i]+=carry
if digits[i]>=10:
digits[i]-=10
carry=1
else:
carry=0
break
if i==0 and carry==1:
digits.insert(0,1)
return digits
sol=Solution()
print sol.plusOne(digits=[10,10])