본문 바로가기

황소개발자

검색하기
황소개발자
프로필사진 hjp845

  • 분류 전체보기 (181)
    • 백준 문제 풀이 (154)
    • 투자자의 생각 (5)
    • 각종 에러 잡기 (10)
    • 앱개발 (8)
    • 매일 11시 영어 (0)
    • 유유자적하게 글쓰기 (0)
Guestbook
반응형
Notice
Recent Posts
Recent Comments
Link
  • 실전언어 연구소
«   2025/07   »
일 월 화 수 목 금 토
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
  • expo
  • 홈화면
  • 11053
  • lcm
  • 안드로이드
  • 11054
  • Combination
  • 최소공배수
  • 11057
  • 매일11시
  • 코틀린
  • 백준
  • itertools
  • 앱
  • 코테
  • 11기
  • LCS
  • Kotlin
  • 9095
  • 순열
  • 1260
  • 6603
  • 나머지
  • 1182
  • 뒤로가기
  • 파이썬
  • 괄호
  • Python
  • permutation
  • Android
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록15650 (1)

황소개발자

백준 15650 파이썬 python : N과 M (2) @@황소처럼 우직하게@@ 아아

n, m = map(int, input().split()) subs = [0 for i in range(m)] def go(idx, selected, n, m): # 길이 채워지면 종료 if selected == m: print(' '.join(map(str, subs))) return # n 초과하면 정수 범위 벗어나는거니까 종료 if idx > n: return # 그 idx를 선택한다면 subs에 넣기 subs[selected] = idx go(idx + 1, selected + 1, n, m) # 그 idx를 선택하지 않았을 때 subs[selected] = 0 go(idx + 1, selected, n, m) go(1, 0, n, m) 빨리 깨닫고 싶다

백준 문제 풀이 2020. 3. 1. 22:21
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바