상세 컨텐츠

본문 제목

[프로그래머스 코딩테스트 고득점 kit] 주식가격

카테고리 없음

by yukmim 2022. 1. 15. 19:09

본문

def solution(prices):
    answer = [0]* len(prices)
    
    for i in range(len(prices)):
        for j in range(i+1, len(prices)):
            if prices[i] <= prices[j]:
                answer[i] += 1
            else:
                answer[i] += 1
                break
    return answer

댓글 영역