Python/프로그래머스 코딩테스트 연습
해시 / 위장
네이키드에르마
2020. 9. 10. 15:50
from itertools import combinations
def solution(clothes):
_dict = {}
for _set in clothes:
_category = _set[1]
if _category in _dict:
_dict[_category] += 1
else:
_dict[_category] = 1
answer = 1
for i in _dict.values():
answer *= (i + 1)
answer = answer - 1
return answer