Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Golden Pyramid by coells
def count_gold(pyramid):
cost = [0]
for level in pyramid:
cost = [0] + [c + max(cost[i:i+2]) for i,c in enumerate(level)]
return max(cost)
May 23, 2014