Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Scarecrow Robot by U.V
def visits(stations: int, control: int, commands: list[int]) -> int:
print(stations,control,commands)
k,d = 0,0
for c in commands:
k += (d == control - 1)
d = (d + c) % stations
return k
March 12, 2025