
Baekjoon/백트래킹
[백준] 6603 로또 (실버2) / 백트래킹
문제요약 나의 코드 및 설명 def dfs(n, start, temp_list): if len(temp_list) == 6: #전달받은 임시 리스트 길이가 6이라면 result.append(temp_list) #추가 return if n == count: return for i in range(start, count): dfs(n+1, i+1, temp_list + [num_list[i]]) while True: num_list = list(map(int, input().split())) if num_list == [0]: #0을 입력받는다면 반복문 탈출 break count = num_list.pop(0) result = [] dfs(0,0,[]) for i in result: print(" ".joi..