Lv2 프로그래머스(Programmers)[Python][파이썬] 의상

"""
출처:프로그래머스,
https://school.programmers.co.kr/learn/courses/30/lessons/42578
"""
# 풀이 과정
# 선택하지 않는 경우의 수 추가 후 그걸 제외!!
def solution(clothes):
from itertools import combinations
from collections import deque

result = 1

check = {}

n = [] # 옷 종류 분류

# dic 내의 종류별 옷 분류

for c in clothes:
if c[-1] not in check:
check[c[-1]] = 1
n.append(c[-1])

else:
check[c[-1]] += 1



final = [] # 확인 할 조합 수


for t in check:
result *= (check[t] + 1)

return result - 1