Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Golden Pyramid by tokiojapan55
def count_gold(pyramid):
gold = [list(p) for p in pyramid]
for n in range(len(gold)-2, -1, -1):
for nn in range(len(gold[n])):
gold[n][nn] += max(gold[n+1][nn], gold[n+1][nn+1])
return gold[0][0]
April 20, 2020