Skip to content

Commit

Permalink
52-xxubin04
Browse files Browse the repository at this point in the history
  • Loading branch information
xxubin04 committed Jul 5, 2024
1 parent 2eefd97 commit ad859b1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions xxubin04/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,6 @@
| 47차시 | 2024.05.23 | Math | <a href="https://www.acmicpc.net/problem/14241">[14241]슬라임 합치기</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/178 |
| 48차시 | 2024.05.27 | 구현 | <a href="https://leetcode.com/problems/valid-palindrome">[125]Valid Palindrome</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/182 |
| 49차시 | 2024.05.30 | Hash | <a href="https://school.programmers.co.kr/learn/courses/30/lessons/92341?language=python3">[2022_KAKAO]주차 요금 계산</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/184 |
| 50차시 | 2024.06.04 | 구현 | <a href="https://leetcode.com/problems/longest-common-prefix/description/">[14]Longest Common Prefix</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/191 |
| 51차시 | 2024.07.01 | Math | <a href="https://school.programmers.co.kr/learn/courses/30/lessons/140107">[Programmers]점 찍기 </a> | https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/194 |
| 52차시 | 2024.07.05 | 구현 | <a href="https://school.programmers.co.kr/learn/courses/30/lessons/64065">[2019 카카오 인턴십]튜플 </a> | https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/198 |
14 changes: 14 additions & 0 deletions xxubin04/구현/2019 카카오 겨울 인턴십_튜플.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
def solution(s):
answer = []
a, i = 2, 1
nums = []
for i in range(2, len(s)-1):
if s[i] == '}':
nums.append(s[a:i].split(","))
a = i + 3
i += 2
for n in sorted(nums, key=lambda x: len(x)):
for m in n:
if not int(m) in answer:
answer.append(int(m))
return answer

0 comments on commit ad859b1

Please sign in to comment.