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
- re.split
- with recursive
- MSA
- Spring
- JPA
- Coroutine
- MySQL
- Kotlin
- 백준 16236
- 백준 17626
- 백준
- sql 기술면접
- 프로래머스
- spring cloud
- 웹어플리케이션 서버
- 백준 19238
- 백준 16719
- 파이썬
- java 기술면접
- 백준 15685
- Spring Boot
- java
- 백준 17779
- 백준 16235
- springboot
- spring security
- 백준 파이썬
- JVM
- 프로그래머스
- spring oauth
Archives
- Today
- Total
목록백준 15656 (1)
시작이 반
[백준] 15656번(python 파이썬)
입력으로 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