add: boj/2217.py
This commit is contained in:
15
boj/2217.py
Normal file
15
boj/2217.py
Normal 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)
|
||||
Reference in New Issue
Block a user