-
백준(BaekJoon)_15657_N과 M(8)Algorithm/Problems_Solving 2022. 8. 27. 11:18
n,m = map(int, input().split()) num_list = list(map(int, input().split())) result = [] def func(idx): if len(result) == m: print(" ".join(map(str,result))) return else: num_list.sort() for idx in range(idx,len(num_list)): result.append(num_list[idx]) func(idx) result.pop() func(0)
'Algorithm > Problems_Solving' 카테고리의 다른 글
프로그래머스(Programmers) LEVEL2 - 행렬의곱셈 (1) 2022.10.01 프로그래머스(Programmers) LEVEL2 - 최댓값과 최솟값 (0) 2022.10.01 백준(BaekJoon)_15656_N과 M(7) (0) 2022.08.27 백준(BaekJoon)_15656_N과M(6) (0) 2022.08.27 백준(BaekJoon)_15654_N과M(5) (0) 2022.08.23