• + 2 comments

    Python3

    def stones(n, a, b):
        # Write your code here
        res=[]
        for i in range(n):
            res.append((i)*b+(n-i-1)*a)
        return sorted(set(res))