programmers.co.kr/learn/courses/30/lessons/42578 코딩테스트 연습 - 위장 programmers.co.kr def solution(clothes): answer = 1 cloth = {} # 딕셔너리에 옷 종류별 옷 개수 저장 for i in clothes: if i[1] in cloth: cloth[i[1]] += 1 else: cloth[i[1]] = 1 # 의상의 조합 개수 계산 for value in cloth.values(): answer *= (value+1) return answer-1 먼저 옷 종류별로 옷이 몇 개가 있는지 파악하기 위해서 딕셔너리를 사용하여 종류별 옷 개수를 저장합니다. cloth에 이미 해당 옷 종류(key)가 있다면 값(value)..