package aoc2019 import "math" func greatestCommonDivisor(a, b int64) int64 { for b != 0 { t := b b = a % b a = t } return a } func leastCommonMultiple(a, b int64) int64 { return a * b / greatestCommonDivisor(a, b) } func manhattenDistance(x1, y1, x2, y2 int) int { return int(math.Abs(float64(x1-x2)) + math.Abs(float64(y1-y2))) }