My Advent of Code solutions in Python. kevinyap.ca/2019/12/going-fast-in-advent-of-code/
advent-of-code python
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update utils.py

+6
+6
2016/utils.py
··· 1 + import math 1 2 from functools import total_ordering 3 + 2 4 3 5 @total_ordering 4 6 class Point: ··· 40 42 @property 41 43 def manhattan(self): 42 44 return abs(self.x) + abs(self.y) 45 + 46 + @property 47 + def distance(self): 48 + return math.sqrt(self.x ** 2 + self.y ** 2)