Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
divmod% solution in Clear category for Square Board by Phil15
def square_board(side, token, steps):
s = side - 1
q, r = divmod(token + steps, s)
return ((s,s-r),(s-r,0),(0,r),(r,s))[q%4]
Jan. 24, 2019
Comments: