1. 본인 코드 n, m = map(int,input().split()) weight = list(map(int,input().split())) weight.sort() count = 0 # 리스트 집합화(원소의 값만 추출하기 위함) weight_set = set(weight) weight_value = list(weight_set) for i in weight_value: tempList = [j for j in weight if j > i] # 현재 i 값보다 큰 무게를 가진 공들만 추출(리스트 컴프리헨션 사용) count += (weight.count(i) * len(tempList)) # (현재 i 개수) * (무게가 더 큰 공 개수) = 조합의 개수 print(count) # 소요시간 : 0.0..