You are viewing a single comment's thread. Return to all comments →
Python 3
Two-liner
input() print(sum(c * 2 ** j for (j, c) in enumerate(sorted(map(int, input().split()), reverse=True))))
Seems like cookies are disabled on this browser, please enable them to open this website
Marc's Cakewalk
You are viewing a single comment's thread. Return to all comments →
Python 3
Two-liner