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

Function part2

2018/src/06.py:20–25  ·  view source on GitHub ↗
(points: list[list[int]])

Source from the content-addressed store, hash-verified

18 return Counter(closest.values()).most_common(1)[0][1]
19
20def part2(points: list[list[int]]) -> int:
21 ans = 0
22 for x,y in bounding_box(points):
23 total_dist = sum(abs(a-x) + abs(b-y) for a,b in points)
24 ans += total_dist < 10000
25 return ans
26
27@aoc.main('06')
28def main(indata: str):

Callers 1

mainFunction · 0.70

Calls 2

bounding_boxFunction · 0.85
absFunction · 0.85

Tested by

no test coverage detected