<doocs>1652.Defuse the Bomb_1.py
def decrypt( code: List[int], k: int) -> List[int]:
    n = len(code)
    res = [0] * n
    if k == 0:
        return res
    for i in range(n):
        if k > 0:
            for j in range(i + 1, i + k + 1):
                res[i] += code[j % n]
        else:
            for j in range(i + k, i):
                res[i] += code[(j + n) % n]
    return res
def sample_funcname ( var_0 : List [ int ] , var_3 : int ) -> List [ int ] :
    var_5 = len ( var_0 )
    var_7 = [ 0 ] * var_5
    if var_3 == 0 :
        return var_7
    for var_9 in range ( var_5 ) :
        if var_3 > 0 :
            for var_11 in range ( var_9 + 1 , var_9 + var_3 + 1 ) :
                var_7 [ var_9 ] += var_0 [ var_11 % var_5 ]
        else :
            for var_11 in range ( var_9 + var_3 , var_9 ) :
                var_7 [ var_9 ] += var_0 [ ( var_11 + var_5 ) % var_5 ]
    return var_7
