일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 뒤로가기
- 6603
- 매일11시
- 11기
- Kotlin
- permutation
- 1182
- expo
- 9095
- 코테
- 11053
- 최소공배수
- 괄호
- 백준
- 나머지
- 파이썬
- Combination
- 11054
- 앱
- 순열
- Python
- LCS
- 안드로이드
- 홈화면
- 코틀린
- lcm
- Android
- itertools
- 11057
- 1260
Archives
- Today
- Total
목록15656 (1)
황소개발자
백준 15656 파이썬 python : N과 M (7) @@황소처럼 우직하게@@
n, m = map(int, input().split()) num_list = list(map(int, input().split())) num_list.sort() a = [0 for i in range(m)] c = [False for i in range(n)] def go(idx, n, m): if idx == m: print(' '.join(map(str, a))) return for i in range(n): a[idx] = num_list[i] go(idx + 1, n, m) # a[selected] = num_list[idx] # go(idx, selected + 1, n, m) # a[selected] = 0 # go(idx + 1, selected, n, m) go(0, n, m)
백준 문제 풀이
2020. 3. 2. 01:17