from collections import Counter
def solution(clothes):
# 의상 종류 별 개수 카운트
category_counts = Counter([category for _, category in clothes])
answer = 1
for count in category_counts.values():
answer *= (count + 1) # 안 입는 경우도 고려하기 위해 +1
return answer - 1 # 모두 안 입은 경우는 제외'PS' 카테고리의 다른 글
| 프로그래머스 77486 Python [다단계 칫솔 판매] (0) | 2026.08.12 |
|---|---|
| 프로그래머스 12985 Python [예상 대진표] (0) | 2026.08.11 |
| 프로그래머스 72411 Python [메뉴 리뉴얼] (0) | 2026.08.07 |
| 프로그래머스 92334 Python [신고 결과 받기] (0) | 2026.08.06 |
| 프로그래머스 87946 C++ [피로도] (0) | 2026.04.30 |