Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Golden Pyramid by popomin
from itertools import product
def count_gold(pyramid):
route_list = [[0]+list(i) for i in product(range(2), repeat=len(pyramid)-1)]
return max([sum([hight[room+sum(route[:num])] for num,(hight,room) in enumerate(zip(pyramid, route))]) for route in route_list])
April 6, 2018