We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d2e3dbf commit bbd12d8Copy full SHA for bbd12d8
1 file changed
zinnnn37/202511/12 PGM LV2 의상.md
@@ -0,0 +1,25 @@
1
+```java
2
+import java.util.HashMap;
3
+import java.util.Map;
4
+
5
+public class PGM_LV2_의상 {
6
7
+ private static int ans;
8
+ private static Map<String, Integer> clothes;
9
10
+ public int solution(String[][] cl) {
11
+ clothes = new HashMap<>();
12
+ ans = 1;
13
14
+ for (String[] c : cl) {
15
+ clothes.put(c[1], clothes.getOrDefault(c[1], 0) + 1);
16
+ }
17
18
+ for (String s : clothes.keySet()) {
19
+ ans *= clothes.get(s) + 1;
20
21
22
+ return ans - 1;
23
24
+}
25
+```
0 commit comments