암호만들기

    [Python] 1759 - 암호만들기

    from itertools import combinations l , c = map(int, input().split()) letters = sorted(input().split()) words = combinations(letters, l) for word in words: cnt = 0 for i in word: if i in "aeiou": cnt += 1 if cnt >= 1 and l - cnt >= 2: print("".join(word))