Skip to content

Commit bc9abff

Browse files
committed
85차 3번 문제 풀이
1 parent 893f90d commit bc9abff

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

live8/test85/문제3/박희경.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
def solution(clothes):
2+
clothes_dict = {}
3+
for name, kind in clothes:
4+
if kind in clothes_dict.keys():
5+
clothes_dict[kind].append(name)
6+
else:
7+
clothes_dict[kind] = [name]
8+
9+
# (n + 1) * (m + 1) - 1
10+
answer = 1
11+
for key, values in clothes_dict.items():
12+
answer *= len(values) + 1
13+
return answer - 1

0 commit comments

Comments
 (0)