250x250
반응형
Recent Posts
Recent Comments
Link
«   2025/06   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Archives
Today
Total
관리 메뉴

재 현

위장 본문

Coding test

위장

본명은이점례 2021. 10. 18. 14:54
728x90

def solution(clothes):
    d = dict()
    for i,j in clothes:
        if j not in d:
            d[j] = 1
        else:
            d[j] += 1
    r = 1
    for i in d.values():
        r *= (i+1)
    return r - 1

728x90

'Coding test' 카테고리의 다른 글

방금 그 곡  (0) 2021.10.21
예산  (0) 2021.10.19
기능개발  (0) 2021.10.17
숫자 문자열과 영단어  (0) 2021.10.13
카카오 신규아이디 추천  (0) 2021.10.13