第一题 python 3: class Solution: def DistanceToHigher(self, height): distance = [0] * len(height) for i in range(len(height)): for j in range(i-1, -1, -1): if height[j] > height[i]: distance[i] = i - j break return distance