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 |
Tags
- java 기술면접
- with recursive
- 프로그래머스
- 파이썬
- 백준 17779
- Coroutine
- 백준 17626
- springboot
- JVM
- 백준 16236
- spring security
- MSA
- 프로래머스
- 백준 15685
- Spring Boot
- 웹어플리케이션 서버
- sql 기술면접
- spring cloud
- Kotlin
- spring oauth
- 백준 19238
- Spring
- java
- 백준 파이썬
- 백준 16235
- 백준 16719
- 백준
- MySQL
- re.split
- JPA
Archives
- Today
- Total
목록백준 15656 (1)
시작이 반
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/cD9Gw8/btqS6Yu7RNO/mcFLKoFRQdkM6nKVpLK3Ek/img.png)
입력으로 n개의 숫자를 임의로 받는다. 이를 list형태로 저장하고 숫자가 작은 것부터 탐색을 해야 하기 때문에 오름차순으로 정렬을 한다. 이전 노드들도 다시 탐색할 수 있다. (반복문에 조건문이 없어도됨) 반복문을 사용하여 모든 노드들을 탐색한다. 오름차순으로 정렬한 리스트의 i번째 값을 append, pop 한다. n, m = map(int, input().split()) my_list = list(map(int, input().split())) my_list.sort() solve = [] def Dfs(depth): if depth == m: print(' '.join(map(str, solve))) return for i in range(n): solve.append(my_list[i]) Dfs..
카테고리 없음
2021. 1. 10. 19:32