Notice
Recent Posts
Recent Comments
Link
250x250
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- cos pro 1급
- 분할정복
- codingtest
- 백준
- Flutter
- 알고리즘
- DFS와BFS
- BAEKJOON
- 코드품앗이
- AndroidStudio
- vuejs
- android
- 안드로이드
- Algorithm
- issue
- cos
- 동적계획법과최단거리역추적
- Python
- 동적계획법
- cos pro
- C++
- 코딩테스트
- Vue
- 코테
- DART
- 파이썬
- django
- 개발
- 안드로이드스튜디오
- DFS
Archives
- Today
- Total
목록cos 주식으로 최대 수익을 내세요 (1)
Development Artist
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/c06D3u/btrujJuZ0c6/dIbfAeADeX8j88bKtt4VGk/img.png)
문제 유형 한줄 수정 난이도 easy Note Nothing Code # -*- coding: utf-8 -*- # UTF-8 encoding when using korean def solution(prices): INF = 1000000001; tmp = INF answer = -INF for price in prices: if tmp != INF: answer = max(answer, price - tmp) tmp = min(tmp, price) return answer prices1 = [1, 2, 3]; ret1 = solution(prices1); print("solution 함수의 반환 값은", ret1, "입니다.") prices2 = [3, 1]; ret2 = solution(prices2..
Algorithm/COS
2022. 2. 24. 22:02