create dev channel
This commit is contained in:
12
zeta/py/completed/11399.py
Normal file
12
zeta/py/completed/11399.py
Normal file
@@ -0,0 +1,12 @@
|
||||
def solve(N, P):
|
||||
P.sort()
|
||||
S = P[0]
|
||||
before = P[0]
|
||||
for p in P[1:]:
|
||||
S += before + p
|
||||
before += p
|
||||
return S
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(solve(int(input()), list(map(int, input().split()))))
|
||||
Reference in New Issue
Block a user