백준 15649 - N과 M
·
Algorithm/백준
python의 permutation내장함수를 통해 풀 수 있는 문제 itertools.permutations()는 순열을 구해주고 itertools.combinations()는 조합을 구해준다. from itertools import permutations n, m = map(int,input().split()) number = permutations(range(1,n+1),m) for i in number: print(*i) www.acmicpc.net/problem/15649 15649번: N과 M (1) 한 줄에 하나씩 문제의 조건을 만족하는 수열을 출력한다. 중복되는 수열을 여러 번 출력하면 안되며, 각 수열은 공백으로 구분해서 출력해야 한다. 수열은 사전 순으로 증가하는 순서로 출력해 www.a..