본문 바로가기 메뉴 바로가기

Devlog

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Devlog

검색하기 폼
  • 분류 전체보기 (171)
    • Record (1)
    • Algorithm (149)
      • Baekjoon (75)
      • Programmers (72)
      • Algorithm (2)
    • CS (9)
      • Data Structure (4)
      • Computer Structure (1)
      • etc. (4)
    • JavaScript (1)
    • Web (5)
    • Troubleshooting (3)
    • C, C++ (3)
  • 방명록

15652 (1)
[백준] 15652 : N과 M (4) - Python

https://www.acmicpc.net/problem/15652 15652번: N과 M (4) 한 줄에 하나씩 문제의 조건을 만족하는 수열을 출력한다. 중복되는 수열을 여러 번 출력하면 안되며, 각 수열은 공백으로 구분해서 출력해야 한다. 수열은 사전 순으로 증가하는 순서로 출력해야 한다. www.acmicpc.net import sys N, M = map(int, sys.stdin.readline().split()) res = [0] * M check = [0] * N def go(index, start, n, m): if index == m: print(*res) return else: for i in range(start, n+1): check[i-1] = 1 res[index] = i go(i..

Algorithm/Baekjoon 2020. 4. 14. 19:14
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
«   2025/08   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바