goal_x and goal_y. Return True if the token can reach (goal_x, goal_y) in a finite number of moves, and False otherwise.goal_x=8, goal_y=24 → True
(1, 1) → (1, 2) → (1, 4) → (1, 3) → (2, 3) → (4, 3) → (8, 3) → (8, 6) → (8, 12) → (8, 24).
goal_x=10, goal_y=15 → False
No sequence of moves ends at (10, 15).
goal_x=12, goal_y=5 → True
goal_x=8, goal_y=24
True
Run checks the first 3 tests in your browser. Submit checks all 88 tests on the server, hidden ones included.