3 ms·
!(x % y) is the same as (x % y == 0), which means the remainder is zero, so x is divisible by y. So it returns 29 if divisible by 400, 28 if divisible by 100,
by wruza 3y ago
!(x % y) is the same as (x % y == 0), which means the remainder is zero, so x is divisible by y.
So it returns 29 if divisible by 400, 28 if divisible by 100, etc.
- rep_lodsb 3y agoOops, you are absolutely correct!