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