Algorithm/Programmers
[Programmers/Python3] 주식가격
HAS3ONG
2019. 3. 8. 19:48
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | def solution(prices): answer = [] length = len(prices) for i in range(0, length): count = 0 for j in range(i, length-1): if prices[i] >prices[j]: break else: count +=1 answer.append(count) return answer | cs |
출처
https://programmers.co.kr/learn/courses/30/lessons/42584?language=python3