ํ์ด
์ฌ์์ ํจ์ค. ํด์์ฌ์ฉ ๋ฌธ์ ์ด๋ค.
Code
def solution(clothes):
cloth_dict = dict()
for c in clothes:
value, key = c
if key not in cloth_dict:
cloth_dict[key] = []
cloth_dict[key].append(value)
ans = 1
for c in cloth_dict:
ans *= (len(cloth_dict[c])+1)
return ans-1