
중복순열 product 사용해서 해결. 문자가 5개 밖에 안 되기 때문에 중복순열로 다 구해도 3905개 밖에 안 된다.
def solution(word):
dic = []
for r in range(1, 6):
dic.extend(list(map("".join, product(['A', 'E', 'I', 'O', 'U'], repeat=r))))
dic.sort()
return dic.index(word)+1
from itertools import product