#1759
문제
풀이
from itertools import combinations
L,C=map(int,input().split())
cipher=list(input().strip().split())
cipher.sort()
moum = ['a', 'e', 'i', 'o', 'u']
a=list(combinations(cipher,L))
for i in a:
answer=""
flag1,flag2=0,0
for check in i:
if check in moum:
flag1=1
else:
flag2+=1
if flag1==1 and flag2>=2:
print(*i,sep='')
알아야했던 것
- combination
https://ourcstory.tistory.com/414 - 리스트 요소를 공백없이 어떻게 가져올 것인가 -> sep=''
https://blog.naver.com/youndok/222066996597
Author And Source
이 문제에 관하여(#1759), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@cherriverhee/1759저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)