<qiyuangong>560_Subarray_Sum_Equals_K_1.py
def subarraySum( nums, k):
    sum_map = {}
    sum_map[0] = 1
    count = curr_sum = 0
    for num in nums:
        curr_sum += num
        count += sum_map.get(curr_sum - k, 0)
        sum_map[curr_sum] = sum_map.get(curr_sum, 0) + 1
    return count
def sample_funcname ( var_0 , var_1 ) :
    var_2 = { }
    var_2 [ 0 ] = 1
    var_6 = var_5 = 0
    for var_7 in var_0 :
        var_5 += var_7
        var_6 += var_2.get ( var_5 - var_1 , 0 )
        var_2 [ var_5 ] = var_2.get ( var_5 , 0 ) + 1
    return var_6
