def solution(prices): answer = [] p_len = len(prices) for i in range(p_len): p = prices[i] cnt = 0 for j in range(i + 1, p_len): cnt += 1 if p > prices[j]: break answer.append(cnt) return answer