A year is leap when it is divisible by 4. But there is one exception. Years ending with two zeros will be leap if they are divisible by 400.
2012 is a leap year. For 2012/4 = 503, that is, an exact division.
1998 is not a leap year, because 1998/4 = 499.5, an inaccurate division.
5000 is not a leap year because, despite being divisible by 4, it is a number ending in 00 and not divisible by 400.
* Submitted by Rennan Lopes