You are viewing a single comment's thread. Return to all comments →
Here is my single line Python solution :
def marcsCakewalk(calorie): # Write your code here return sum((2**i) * calorie[i] for i in range(len(calorie))) if calorie.sort(reverse=True) or True else 0
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 →
Here is my single line Python solution :