From 6ff10b26fee5a42e0d50043c60d49bfbdd45f770 Mon Sep 17 00:00:00 2001 From: H0ngJu Date: Tue, 6 Aug 2024 16:36:39 +0900 Subject: [PATCH] 2024-08-06 --- H0ngJu/README.md | 4 +-- .../\354\235\230\354\203\201.py" | 28 +++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 "H0ngJu/\355\225\264\354\213\234/\354\235\230\354\203\201.py" diff --git a/H0ngJu/README.md b/H0ngJu/README.md index c76b9d05..cec77720 100644 --- a/H0ngJu/README.md +++ b/H0ngJu/README.md @@ -22,7 +22,7 @@ | 18차시 | 2024.05.26 | DFS | [계란으로 계란치기](https://www.acmicpc.net/problem/16987) | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/199 | | 19차시 | 2024.05.31 | DP | [합분해](https://www.acmicpc.net/problem/2225) | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/202 | | 20차시 | 2024.06.03 | 백트래킹 | [스타트와 링크](https://www.acmicpc.net/problem/14889) | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/206 | - -| 21차시 | 2024.06.07 | 그리디 | [행복 유치원](https://www.acmicpc.net/problem/13164) | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/208 | +| 21차시 | 2024.06.07 | 그리디 | [행복 유치원](https://www.acmicpc.net/problem/13164) | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/208 | +| 22차시 | 2024.08.06 | 해시 | [의상](https://school.programmers.co.kr/learn/courses/30/lessons/42578) | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/224 | --- diff --git "a/H0ngJu/\355\225\264\354\213\234/\354\235\230\354\203\201.py" "b/H0ngJu/\355\225\264\354\213\234/\354\235\230\354\203\201.py" new file mode 100644 index 00000000..d88dd0f8 --- /dev/null +++ "b/H0ngJu/\355\225\264\354\213\234/\354\235\230\354\203\201.py" @@ -0,0 +1,28 @@ +import sys +import itertools + +def input() : return sys.stdin.readline().rstrip() + +clothes = [["yellow_hat", "headgear"], + ["blue_sunglasses", "eyewear"], + ["green_turban", "headgear"], + ["test1", "sample"], + ["test2", "sample"], + ] +c_dict = {} +answer = 1 + +for info in range(len(clothes)): + if not clothes[info][1] in c_dict: + c_dict[clothes[info][1]] = 1 + else: + c_dict[clothes[info][1]] += 1 + +# answer = collections.Counter(c_dict) + +for c in c_dict.values(): + answer *= (c+1) + +answer -= 1 + +print(answer)