첫 번째 풀이def solution(weights): w = list(set(weights)) w_set = sorted(w) w_dict = dict.fromkeys(w_set, 0) for _ in weights: w_dict[_] += 1 cnt = 0 for _ in w_set: if w_dict[_] >= 2: cnt += (1 / 2) * w_dict[_] * (w_dict[_] - 1) n = len(w_set) for i in range(n - 1): for j in range(i + 1, n): if w_set[i] * 2 == w_set[j]: ..