smallest-multiple-parity-shortcut

Status: IN

The LCM of `n` and 2 is computed as a parity check (`n if n % 2 == 0 else n * 2`) rather than using `math.gcd`, because 2 is prime so `gcd(n, 2)` is always 1 or 2

Source: entries/2026/06/06/smallest-even-multiple-solution.md

JSON