Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. # BOJ 11399 - ATM
  2. import sys
  3. from itertools import accumulate
  4.  
  5. N = int(sys.stdin.readline())
  6.  
  7. people = sorted(list(map(int, sys.stdin.readline().split())))
  8.  
  9. print(sum(list(accumulate(people))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement