본문 바로가기
python-algorithm

백준 15649 N과 M (1)

by 무적김두칠 2022. 1. 10.

1
2
3
4
5
from itertools import permutations
n,m =map(int,input().split())
p=permutations(range(1,n+1),m)
for i in p:
    print(" ".join(map(str,i)))
cs
반응형

'python-algorithm' 카테고리의 다른 글

백준 15651 N과 M (3)  (0) 2022.01.10
백준 15650 N과 M (2)  (0) 2022.01.10
백준 13610 Volta  (0) 2022.01.10
백준 14065 Gorivo  (0) 2022.01.10
백준 14173 Square Pasture  (0) 2022.01.10

댓글