Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
6-liner: clean solution in Clear category for The Stones by przemyslaw.daniel
def stones(pile, moves):
result = set()
for move in range(pile):
check = set([move-i for i in moves])
result |= set([move]*(not (result & check)))
return 1+(pile-1 in result)
Sept. 20, 2018
Comments: