Marc's Cakewalk

  • + 0 comments
    def marcsCakewalk(calorie):
        calorie = sorted(calorie,reverse=True)
        n = len(calorie)
        return sum([2**i * v  for i, v in zip(range(n),calorie) ])