We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02e40b1 commit 3dbab61Copy full SHA for 3dbab61
LiiNi-coder/202511/15 PGM 의상.md
@@ -0,0 +1,21 @@
1
+```java
2
+import java.util.*;
3
+
4
+class Solution {
5
+ public int solution(String[][] clothes) {
6
+ Map<String, Integer> countByType = new HashMap<>();
7
+ for (String[] cloth : clothes) {
8
+ String type = cloth[1];
9
+ countByType.put(type, countByType.getOrDefault(type, 0) + 1);
10
+ }
11
+ int combinations = 1;
12
+ for (int count : countByType.values()) {
13
+ combinations *= (count + 1);
14
15
+ combinations -= 1;
16
17
+ return combinations;
18
19
+}
20
21
+```
0 commit comments