Skip to content

Commit

Permalink
56-xxubin04
Browse files Browse the repository at this point in the history
  • Loading branch information
xxubin04 committed Aug 4, 2024
1 parent 2eefd97 commit 13cc86c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
7 changes: 7 additions & 0 deletions xxubin04/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@
| 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 |
| 53์ฐจ์‹œ | 2024.07.08 | DP | <a href="https://www.acmicpc.net/problem/2193">[2193]์ด์นœ์ˆ˜ </a> | https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/200 |
| 54์ฐจ์‹œ | 2024.07.11 | Tree | <a href="https://www.acmicpc.net/problem/1991">[1991]ํŠธ๋ฆฌ ์ˆœํšŒ </a> | https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/203 |
| 55์ฐจ์‹œ | 2024.07.29 | ์ •๋ ฌ | <a href="https://school.programmers.co.kr/learn/courses/30/lessons/42747?language=python3">[Programmers]H-Index </a> | https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/208 |
| 56์ฐจ์‹œ | 2024.08.05 | ๊ตฌํ˜„ | <a href="https://school.programmers.co.kr/learn/courses/30/lessons/17677#">[2018 KAKAO BLIND]๋‰ด์Šค ํด๋Ÿฌ์Šคํ„ฐ๋ง </a> | https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/211 |
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from math import floor

def solution(str1, str2):
answer = 0
list1, list2 = [], []
for a in range(len(str1)-1):
if (slice_a := str1[a:a+2]).isalpha():
list1.append(str1[a:a+2].upper())
for b in range(len(str2)-1):
if (slice_b := str2[b:b+2]).isalpha():
list2.append(str2[b:b+2].upper())

total = len(list1) + len(list2)
duplication = 0

for i in list1:
if i in list2:
list2.remove(i)
duplication += 1

if len(list2) == 0 or total == duplication:
return 65536

answer = floor(duplication / (total - duplication) * 65536)

return answer

0 comments on commit 13cc86c

Please sign in to comment.