<qiyuangong>134_Gas_Station_1.py
def canCompleteCircuit( gas, cost):
    ls = len(gas)
    begin, end = 0, ls - 1
    curr = gas[end] - cost[end]
    while begin < end:
        if curr >= 0:
            curr += gas[begin] - cost[begin]
            begin += 1
        else:
            end -= 1
            curr += gas[end] - cost[end]
    if curr >= 0:
        return end
    else:
        return -1
def sample_funcname ( var_0 , var_1 ) :
    var_3 = len ( var_0 )
    var_5 , var_7 = 0 , var_3 - 1
    var_8 = var_0 [ var_7 ] - var_1 [ var_7 ]
    while var_5 < var_7 :
        if var_8 >= 0 :
            var_8 += var_0 [ var_5 ] - var_1 [ var_5 ]
            var_5 += 1
        else :
            var_7 -= 1
            var_8 += var_0 [ var_7 ] - var_1 [ var_7 ]
    if var_8 >= 0 :
        return var_7
    else :
        return - 1
