You are viewing a single comment's thread. Return to all comments →
You can one-line this beauty like this :
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 →
You can one-line this beauty like this :