739. 每日温度 class Solution: def dailyTemperatures(self, T): stack = [] n = len(T) outputlist = [0] * n for i in range(n): while stack != [] and T[i] > T[stack[-1]]: top =stack.pop() outputlist[top] = i - top stack.append(i) return outputlist