728x90
SMALL
그새 또 까먹은 { }......................ㅠ 😥
복습 필수다 !!!!!!!!!!!!!!!!!!!!
def solution(clothes):
answer = {}
for i in clothes:
clotes_type = i[1]
if clotes_type in answer:
answer[clotes_type] += 1
else:
answer[clotes_type] = 1
result = 1
for i in answer.values():
result *=(i+1)
result-=1
return result
728x90
LIST
'취준시절 > 프로그래머스' 카테고리의 다른 글
[프로그래머스] 2018 KAKAO BLIND RECRUITMENT - [3차] 파일명 정렬 (0) | 2021.09.08 |
---|---|
[프로그래머스] 소수찾기 - Python (0) | 2021.08.26 |
[프로그래머스] 구명보트 - Python (0) | 2021.08.10 |
[프로그래머스] 가장 큰 정사각형 찾기 - Python (0) | 2021.08.10 |
[프로그래머스] 올바른 괄호 - Python (0) | 2021.08.08 |