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

Function dist

2018/src/25.py:4–5  ·  view source on GitHub ↗
(s1: list[int], s2: list[int])

Source from the content-addressed store, hash-verified

2import re
3
4def dist(s1: list[int], s2: list[int]) -> int:
5 return sum(abs(a-b) for a,b in zip(s1,s2))
6
7def pop_constellation(stars: list[list[int]], s: list[int]):
8 if s not in stars:

Callers 1

pop_constellationFunction · 0.85

Calls 1

absFunction · 0.85

Tested by

no test coverage detected