문제 설명 및 풀이2개를 사면 1개를 공짜로 주기 때문에가장 비싼 것부터 정렬하면 가장 이득을 볼 수 있습니다. => 내림차순으로 정렬=> 3번째 아이템마다 가격계산 안하고 점프정답 예시 코드import sysinput = sys.stdin.readlinen = int(input())price_list = [int(input()) for _ in range(n)]price_list.sort(reverse=True)total_price = 0count = 0for price in price_list: count += 1 if count % 3 == 0: count = 0 continue total_price += priceprint(total_price)