diff --git a/day12.py b/day12.py index 05c8ed5..57208ef 100644 --- a/day12.py +++ b/day12.py @@ -1,9 +1,12 @@ #!/usr/bin/env python3 from itertools import combinations -from math import lcm +from math import gcd from functools import reduce +def lcm(a, b): + return (a * b) // gcd(a, b) + def comp(a, b): def f(arg): x, y = arg