Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for The Stones by tokiojapan55
def stones(pile, moves):
table = [False]
for p in range(1, pile + 1):
for m in moves:
if m < p and table[p - m] == False:
table.append(True)
break
if len(table) == p:
table.append(False)
return 1 if table[-1] else 2
June 21, 2021