https://www.acmicpc.net/problem/2217
N = int(input())
ropes = sorted([int(input()) for _ in range(N)],reverse = True)
answer = 0
while(ropes):
answer = max(answer,ropes[-1]*len(ropes))
ropes.pop()
print(answer)
Time cost가 있음 왜일까~
max = O(n)이기 때문에 루프안에서 max 사용하는 것이 좋지 않음