We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 893f90d commit bc9abffCopy full SHA for bc9abff
1 file changed
live8/test85/문제3/박희경.py
@@ -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