From bbd12d805320c5bacd75b188758b0c35026381ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=A7=84?= Date: Wed, 12 Nov 2025 19:15:09 +0900 Subject: [PATCH] =?UTF-8?q?[20251112]=20PGM=20/=20LV2=20/=20=EC=9D=98?= =?UTF-8?q?=EC=83=81=20/=20=EA=B9=80=EB=AF=BC=EC=A7=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../12 PGM LV2 \354\235\230\354\203\201.md" | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 "zinnnn37/202511/12 PGM LV2 \354\235\230\354\203\201.md" diff --git "a/zinnnn37/202511/12 PGM LV2 \354\235\230\354\203\201.md" "b/zinnnn37/202511/12 PGM LV2 \354\235\230\354\203\201.md" new file mode 100644 index 00000000..94380c95 --- /dev/null +++ "b/zinnnn37/202511/12 PGM LV2 \354\235\230\354\203\201.md" @@ -0,0 +1,25 @@ +```java +import java.util.HashMap; +import java.util.Map; + +public class PGM_LV2_의상 { + + private static int ans; + private static Map clothes; + + public int solution(String[][] cl) { + clothes = new HashMap<>(); + ans = 1; + + for (String[] c : cl) { + clothes.put(c[1], clothes.getOrDefault(c[1], 0) + 1); + } + + for (String s : clothes.keySet()) { + ans *= clothes.get(s) + 1; + } + + return ans - 1; + } +} +``` \ No newline at end of file