diff --git "a/ing-eoking/[1\354\260\250] \353\211\264\354\212\244 \355\201\264\353\237\254\354\212\244\355\204\260\353\247\201.py" "b/ing-eoking/[1\354\260\250] \353\211\264\354\212\244 \355\201\264\353\237\254\354\212\244\355\204\260\353\247\201.py" new file mode 100644 index 0000000..71c9dcd --- /dev/null +++ "b/ing-eoking/[1\354\260\250] \353\211\264\354\212\244 \355\201\264\353\237\254\354\212\244\355\204\260\353\247\201.py" @@ -0,0 +1,10 @@ +from collections import Counter + +def solution(str1, str2): + ext = lambda s: [s[i:i+2] for i in range(len(s)-1) + if (s[i:i+2]).isalpha()] + a = Counter(ext(str1.lower())) + b = Counter(ext(str2.lower())) + itr = sum((a & b).values()) + uni = sum((a | b).values()) + return 65536 if uni == 0 else int(itr / uni * 65536)