Beakjoon&프로그래머스/파이썬
[백준/파이썬] 5568번 카드 놓기
현장
2022. 5. 5. 21:02
-Code
from itertools import permutations
n = int(input())
k = int(input())
cards = [input() for _ in range(n)]
cards_p = list(permutations(cards, k))
result = []
for num in cards_p:
N = int("".join(num))
if N not in result:
result.append(N)
print(len(result))