
의상-파이썬(Python) [프로그래머스/코딩테스트 연습/Lv.2]
·
Algorithm, 코딩테스트
문제https://school.programmers.co.kr/learn/courses/30/lessons/42578?language=python3 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr 풀이def solution(clothes): answer = 1 clothes_dict={} for i in clothes: clothes_dict[i[1]]=clothes_dict.get(i[1],1)+1 for i in clothes_dict.values(): answer*=i answer-=1 return answerTip경우의 수 문제의상의 종류마다 개수를..