Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for The Stones by Moff
def stones(n, moves):
a = [0]
for i in range(n):
a.append(min(1 - a[max(i - s + 1, 0)] for s in moves))
return a[-1] + 1
Oct. 9, 2018