Created
January 3, 2020 14:36
-
-
Save ShinJJang/6ed17724828c84563873a5fc0c7aafb5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def solution(clothes): | |
c_dict = {} | |
for name, part in clothes: | |
c_dict[part] = c_dict.get(part, 0) + 1 | |
c_sum = list(c_dict.values()) | |
answer = 1 | |
for v in c_sum: | |
answer *= v + 1 | |
return answer - 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment