Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |
Tags
- boj 11657
- boj 1074
- pcce 기출문제 풀이
- boj 1717
- boj 6443
- lock based queue
- special string again
- making anagrams
- find the running median
- ice cream parlor
- DirectX12
- the longest increasing subsequence
- c++
- pccp 기출문제 풀이
- PCCE
- two characters
- 프로그래밍공부
- lock free stack
- DirectX
- 브루트포스
- lock based stack
- find the town judge
- the maximum subarray
- 지게차와 크레인
- LCS
- 2025 프로그래머스 코딩챌린지 1차예선
- count triplets
- dp
- string construction
- gas
Archives
- Today
- Total
목록python 피로도 (1)
오구의코딩모험

[코딩테스트 고득점 KIT - 완전탐색] 순열을 이용하여 모든 피로도 소모 경우의 수를 계산해준다. 소모되어 줄어든 피로도를 HP 변수에 담으며, 남은 피로도인 HP가 탐험할 던전의 "최소 필요 피로도" 보다 높으면 피로도를 소모하여 탐험한다. 탐험 후 HP에서 소모한 피로도만큼 줄여준다. 끝 from itertools import permutations def solution(k, dungeons): answer = 0 ## permutations 순열 라이브러리 for dungeon in list(permutations(dungeons,len(dungeons))): # 탐험한 던전의 수 result = 0 # 남은 피로도 HP = k for root in dungeon: # 요구사항 if root[0]
프로그래밍 공부/프로그래머스
2023. 1. 3. 21:59