https://school.programmers.co.kr/learn/courses/30/lessons/87946?language=python3
from itertools import permutations
def solution(k, dungeons):
max_count = 0
explore_list = permutations(dungeons)
for dungeon_list in explore_list:
curr_k = k
curr_count = 0
for dungeon in dungeon_list:
if curr_k >= dungeon[0]:
curr_k -= dungeon[1]
curr_count += 1
else:
break
max_count = max(max_count, curr_count)
return max_count
순열을 이용하여 모든 케이스를 탐색하였다.