add: boj/2217.py

This commit is contained in:
Gyubin Han
2024-05-07 21:45:32 +09:00
parent 4703e305f0
commit 8a23b84f69

15
boj/2217.py Normal file
View File

@@ -0,0 +1,15 @@
n=int(input())
arr=[]
mx=0
for _ in range(n):
arr.append(int(input()))
arr.sort(reverse=True)
for i in range(n):
v=arr[i]*(i+1)
if mx<v:
mx=v
print(mx)