Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
4-liner: just pick up all *items solution in Clear category for Compass, Map and Spyglass by przemyslaw.daniel
def navigation(seaside):
width, seaside = len(seaside[0]), sum(seaside, [])
(start_x, start_y), *items = [divmod(seaside.index(x), width) for x in 'YCMS']
return sum(max(abs(start_x-x), abs(start_y-y)) for x, y in items)
Sept. 5, 2018
Comments: