Returns the least common multiple of two integers.
The result is always non-negative.
int lcm(int x, int y) { if (x == 0 || y == 0) { return 0; } return ((x ~/ x.gcd(y)) * y).abs(); }