def smallest_sub_sum_greater_than_n(data, n):
    current = []
    smaller = []
    i = 0
    j = 0
    while i < len(data):
        current = data[i:j]
        current_sum = sum(value for value in current);
        if current_sum > n:
            if ( len(current) < len(smaller) ) or len(smaller) == 0:
                smaller = current
            else:
                i = i + 1
        else:
            j = j + 1
        if j > len(data):
            i =  i + 1
            j =  i
    return len(smaller), smaller

print smallest_sub_sum_greater_than_n([1, 4, 45, 6, 0, 1], 51)
print smallest_sub_sum_greater_than_n([1, 10, 5, 2 ], 9)
print smallest_sub_sum_greater_than_n([1, 11, 100, 1, 0, 200, 3, 2, 1, 250], 280)




