[해시] 프로그래머스 위장 문제 파이썬(python)
https://programmers.co.kr/learn/courses/30/lessons/42578 맞았습니다: from itertools import combinations def solution(clothes): count={} for i in clothes: if i[1] in count: count[i[1]] += 1 else: count[i[1]] = 1 total = 1 keys = list(count.keys()) types = len(keys) for key in keys: total *= count[key]+1 total -= 1 return total ✔︎ 분명 어제 Counter함수를 새로 배웠는데 적용을 못했다. Counter(배열) → 배열 안에 각 원소가 몇 개 들어있는지를 <..
2022.04.09