Ice Cream Parlor

  • + 0 comments
    def icecreamParlor(m, arr):
        return [[i + 1, len(arr) - arr[::-1].index(m - v)] for i, v in enumerate(arr) if m - v in arr[i+1:]][0]