Leap Years with GCD in various languages

I saw this deck via Haskell Weekly Recap which noted an interesting property: “x is a leap year if and only if gcd(80, x) > gcd(50, x)” (gcd = ‘greatest common divisor’) which I haven’t fully appreciated the origin of, but wanted to try some implementations. The …