<garvit244>989_1.py
def addToArrayForm( A, K):
    arr_k = []
    while K >0:
        digit = K%10
        K /= 10
        arr_k.append(digit)
        
    arr_k.reverse()
    if len(arr_k) > len(A):
        A, arr_k = arr_k, A
    
    sum_arr = [0]*len(A)
    i, j = len(A)-1, len(arr_k)-1
    k = len(A) -1
    digit_sum, carry = 0, 0
    while j >= 0:
        curr_sum = A[i] + arr_k[j] + carry
        sum_arr[k] = (curr_sum%10)
        carry = curr_sum//10
        i -= 1
        k -= 1
        j -= 1
    
    while i >= 0:
        curr_sum = A[i] + carry
        sum_arr[k] = (curr_sum%10)
        carry =curr_sum//10
        i -= 1
        k -= 1
        
    if carry:
        sum_arr = [carry] + sum_arr
    return sum_arr
def sample_funcname ( var_0 , var_1 ) :
    var_2 = [ ]
    while var_1 > 0 :
        var_5 = var_1 % 10
        var_1 /= 10
        var_2.append ( var_5 )
    var_2.reverse ( )
    if len ( var_2 ) > len ( var_0 ) :
        var_0 , var_2 = var_2 , var_0
    var_9 = [ 0 ] * len ( var_0 )
    var_11 , var_12 = len ( var_0 ) - 1 , len ( var_2 ) - 1
    var_13 = len ( var_0 ) - 1
    var_14 , var_15 = 0 , 0
    while var_12 >= 0 :
        var_16 = var_0 [ var_11 ] + var_2 [ var_12 ] + var_15
        var_9 [ var_13 ] = ( var_16 % 10 )
        var_15 = var_16 // 10
        var_11 -= 1
        var_13 -= 1
        var_12 -= 1
    while var_11 >= 0 :
        var_16 = var_0 [ var_11 ] + var_15
        var_9 [ var_13 ] = ( var_16 % 10 )
        var_15 = var_16 // 10
        var_11 -= 1
        var_13 -= 1
    if var_15 :
        var_9 = [ var_15 ] + var_9
    return var_9
