MCPcopy Create free account
hub / github.com/AxlLind/AdventOfCode / main

Function main

2018/src/10.py:17–26  ·  view source on GitHub ↗
(indata: str)

Source from the content-addressed store, hash-verified

15
16@aoc.main('10')
17def main(indata: str) -> tuple[str,int]:
18 stars = [[int(i) for i in re.findall("-?\d+", l)] for l in indata.split('\n')]
19 for steps in range(1000000):
20 for s in stars:
21 s[0] += s[2]
22 s[1] += s[3]
23 steps += 1
24 if grid := print_grid(stars):
25 return grid, steps
26 assert False
27
28if __name__ == "__main__":
29 main()

Callers 1

10.pyFile · 0.70

Calls 1

print_gridFunction · 0.85

Tested by

no test coverage detected