https://www.acmicpc.net/problem/2217
import sys
input = sys.stdin.readline
n = int(input().rstrip())
rope_list = [int(input().rstrip()) for _ in range(n)]
rope_list.sort(reverse = True) # 역순으로 정렬
result = 0
for i in range(n):
result = max(result, rope_list[i] * (i + 1))
print(result)
예를 들어 3개의 로프가 있다고 하자.
rope_list = [4, 11, 33]
로프가 1개일 때 33 x 1 = 33
로프가 2개일 때 17 x 2 = 34
로프가 3개일 때 4 x 3 = 12
최대 중량은 34이다.