No wonder it was rough: you have the formula wrong.
A leap year (ignoring U.S. presidential elections and summer Olympics) is any year divisible by four except when it is divisible by 100, in which case it must also be divisible by 400 in order to be a leap year.
Oh, right. In other words, leap years don’t occur on turn-of-the-century years, except for 1600, 2000, 2400, etc.
As a little kid I had looked forward to 2000 not being a leap year (just for the novelty of skipping a leap year) and was kind of disappointed to find out it was one of the every-four-centuries exceptions.