백준 1759 - 암호 만들기


백준 1759 - 암호 만들기

1234567891011121314151617from itertools import combinationsn,c = map(int, input().split())words = input().split()vowels = ["a","e","i","o","u"]words.sort()words = list(combinations(words,n)) for i in words: cnt = [0, 0] for j in i: if j in vowels: cnt[0] += 1 else: cnt[1] += 1 if cnt[0] > 0 and cnt[1] > 1: print("".join(i)) Colored by Color Scriptercs 조합을 생성해 조건이 맞는 암호만 print...

백준 1759 - 암호 만들기에 대한 요약내용입니다.

자세한 내용은 아래에 원문링크를 확인해주시기 바랍니다.



원문링크 : 백준 1759 - 암호 만들기