diff --git a/H0ngJu/README.md b/H0ngJu/README.md index 4f76049a..1080678a 100644 --- a/H0ngJu/README.md +++ b/H0ngJu/README.md @@ -23,6 +23,7 @@ | 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 | +| 22차시 | 2024.08.06 | 해시 | [의상](https://school.programmers.co.kr/learn/courses/30/lessons/42578) | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/224 | | 24차시 | 2024.08.17 | BFS | [아기상어](https://www.acmicpc.net/problem/16236) | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/233 | 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)