홈 » Posts파이썬 알고리즘 : 의상해시2024년 4월 15일 · 1 분 · 배준수 | 수정 제안목차문제난이도코드2024년 4월 15일 알고리즘 문제풀이#문제#의상난이도#Lv. 2코드# 1 2 3 4 5 6 7 8 9 10 11 12 13 14 def solution(clothes): answer = 0 arr = dict() for x in clothes: [n,t] = x if t in arr: arr[t] += 1 else: arr[t] = 1 cnt = 1 for a,b in arr.items(): cnt *= (b+1) answer = cnt-1 return answer 댓글댓글 불러오기
댓글