Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Scarecrow Robot by tokiojapan55
def visits(stations: int, control: int, commands: list[int]) -> int:
return ([1] + [sum(commands[:n+1]) % stations + 1 for n in range(len(commands))]).count(control)
Aug. 19, 2024
Comments: