-
주식 가격 [Python3]2018~2019/Level 2 2018. 10. 1. 22:52
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
def solution(prices): answer = [] time = 0 for i in range(0, len(prices)): max = prices[i] for j in range(i, len(prices)-1): if max <= prices[j]: time += 1 else: break answer.append(time) time = 0 return answer
'2018~2019 > Level 2' 카테고리의 다른 글
올바른 괄호 [Python3] (0) 2018.10.02 다음 큰 숫자 [JavaScript] (0) 2018.10.01 위장 [Python3] (0) 2018.10.01 전화번호 목록 [Python3] (0) 2018.10.01 124 나라의 숫자 (0) 2018.10.01