from itertools import product
def solution(word):
answer = []
words = "AEIOU"
n = len(words)
a=0
for i in range(1,n+1):
answer.extend(map(''.join,product(words,repeat=i)))
answer.sort()
a=answer.index(word)
return a+1'프로그래머스' 카테고리의 다른 글
| Level2 최솟값 만들기 (0) | 2022.02.03 |
|---|---|
| Level2 최댓값과 최솟값 (0) | 2022.02.03 |
| Level2 구명보트 (0) | 2022.02.03 |
| Level2 주식가격 (0) | 2022.02.03 |
| Level2 영어 끝말잇기 (0) | 2022.02.02 |
댓글