We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ddfe2d3 commit f108712Copy full SHA for f108712
ing-eoking/[1차] 뉴스 클러스터링.py
@@ -0,0 +1,10 @@
1
+from collections import Counter
2
+
3
+def solution(str1, str2):
4
+ ext = lambda s: [s[i:i+2] for i in range(len(s)-1)
5
+ if (s[i:i+2]).isalpha()]
6
+ a = Counter(ext(str1.lower()))
7
+ b = Counter(ext(str2.lower()))
8
+ itr = sum((a & b).values())
9
+ uni = sum((a | b).values())
10
+ return 65536 if uni == 0 else int(itr / uni * 65536)
0 commit comments