summaryrefslogtreecommitdiff
path: root/numbers-station-coded-messages/n1c00o/solution.py
blob: 8c2f71769c2e240e7fc5ce878a46293e35a4448c (plain)
1
2
3
4
5
6
7
8
9
10
11
def solution(l, t):
    for start_i in range(len(l)):
        sum = 0

        for curr_i in range(start_i, len(l)):
            sum += l[curr_i]

            if sum == t:
                return [start_i, curr_i]

    return [-1, -1]