diff --git a/.DS_Store b/.DS_Store index 9dca0ad..0e71c75 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/pu2rile/README.md b/pu2rile/README.md index 21d88bf..9e8c156 100644 --- a/pu2rile/README.md +++ b/pu2rile/README.md @@ -17,4 +17,5 @@ | 13차시 | 2024.07.26 | 스택 | [후위 표기식](https://www.acmicpc.net/problem/1918) | [#43](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/43) | 14차시 | 2024.08.05 | 트리 | [이진 탐색 트리](https://www.acmicpc.net/problem/5639) | [#45](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/45) | 15차시 | 2024.08.15 | 트리 | [나무 탈출](https://www.acmicpc.net/problem/15900) | [#48](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/48) -| 16차시 | 2024.09.15 | 그리디 알고리즘 | [신입 사원](https://www.acmicpc.net/problem/15900) | [#51](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/51) \ No newline at end of file +| 16차시 | 2024.09.15 | 그리디 알고리즘 | [신입 사원](https://www.acmicpc.net/problem/15900) | [#51](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/51) +| 17차시 | 2024.09.24 | 문자열 | [콰트로치즈피자](https://www.acmicpc.net/problem/27964) | [#54](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/54) \ No newline at end of file diff --git "a/pu2rile/\353\254\270\354\236\220\354\227\264/\354\275\260\355\212\270\353\241\234\354\271\230\354\246\210\355\224\274\354\236\220.py" "b/pu2rile/\353\254\270\354\236\220\354\227\264/\354\275\260\355\212\270\353\241\234\354\271\230\354\246\210\355\224\274\354\236\220.py" new file mode 100644 index 0000000..65fac95 --- /dev/null +++ "b/pu2rile/\353\254\270\354\236\220\354\227\264/\354\275\260\355\212\270\353\241\234\354\271\230\354\246\210\355\224\274\354\236\220.py" @@ -0,0 +1,15 @@ +toping = int(input()) +toping_lst = input().split() +cheese_set = set() + +for cheese in toping_lst: + # 토핑 이름의 마지막 6글자가 Cheese인지 확인 + # 치즈 토핑이 맞다면 + if cheese[-6:] == 'Cheese': + # 집합에 치즈 이름 추가 (중복 자동 제거) + cheese_set.add(cheese) + +if len(cheese_set) >= 4: # 서로 다른 치즈가 4개 이상이면 + print("yummy") +else: + print("sad") \ No newline at end of file