분류 전체보기 (49) 썸네일형 리스트형 [백준 15649] N과 M(1) def NM(lst,Plst,n): if n==0: for i in range(len(Plst)-1): print(Plst[i], end=" ") print(Plst[len(Plst)-1]) else : for i in range(len(lst)): Nlst=[i for i in lst] NPlst=[i for i in Plst] Nlst.remove(lst[i]) NPlst.append(lst[i]) NM(Nlst,NPlst,n-1) m,n=map(int, input().split()) lstA=[i+1 for i in range(m)] NM(lstA,[],n) 이전 1 ··· 4 5 6 7 다음