Skip to content

Commit

Permalink
#2 : 15650_N과 M(2)
Browse files Browse the repository at this point in the history
  • Loading branch information
ziy00n committed Apr 12, 2023
1 parent 983db0d commit ddf1e64
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions 이티지윤/15650_N과 M(2).py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import itertools
n, m = map(int, input().split())

nums = [ i for i in range(1, n+1)] #1~n까지 nums에 넣기

arr = itertools.combinations(nums, m) #중복 제외, 순서 상관없는 조합 만들기
for i in arr:
for j in i:
print(j, end=' ')
print()

0 comments on commit ddf1e64

Please sign in to comment.