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

4517fd0270e4f02f8addff7555f4e6a4e2832486
<mask token>

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