diff --git "a/lkhyun/202510/23 PGM Lv2 \355\212\234\355\224\214.md" "b/lkhyun/202510/23 PGM Lv2 \355\212\234\355\224\214.md" new file mode 100644 index 00000000..1a5843ad --- /dev/null +++ "b/lkhyun/202510/23 PGM Lv2 \355\212\234\355\224\214.md" @@ -0,0 +1,14 @@ +```python +def solution(s): + answer = [] + unions = s[2:-2].split("},{") + + dic = {} + for union in unions: + u = list(map(int, union.split(","))) + for i in u: + dic[i] = dic.get(i,0) + 1 + + dic = sorted(dic.items(),key=lambda x : x[1],reverse=True) + return [x[0] for x in dic] +```