728x90
https://www.acmicpc.net/problem/2217
N= int(input())
k = []
for i in range(N):
k.append(int(input()))
k.sort()
k_max = []
for i in range(N):
k_max.append(k[i]*(len(k)-i))
print(max(k_max))
728x90
https://www.acmicpc.net/problem/2217
N= int(input())
k = []
for i in range(N):
k.append(int(input()))
k.sort()
k_max = []
for i in range(N):
k_max.append(k[i]*(len(k)-i))
print(max(k_max))
댓글