Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Proper Leap Years

Limits 1s, 512 MB

Byang's friend was asked to author a programming problem where the challenge was to identify if the input number represented a leap year. The toad he is, he messed up and ended up using an incorrect definition of leap years.

Byang, embarrassed by what his friend did, took it upon himself to prepare a leap years problem using the correct description.

In the Gregorian calendar, certain years have 366 days instead of 365. In such years, the month of February is extended to have 29 days (instead of 28 days). These years are known as leap years.

Leap years are years which are multiples of four (with the exception of centennial years not divisible by 400).

[From Wikipedia]

Given a year, determine if the year is a leap year.


The input will contain a one integer Y (0 < Y < 9999).


Print “Yes” if the year is a leap year, otherwise “No”.





90% Solution Ratio

YouKnowWhoEarliest, Mar '19

YouKnowWhoFastest, 0.0s

N550999.Lightest, 0 B

Nusab19Shortest, 61B


Login to submit

Toph uses cookies. By continuing you agree to our Cookie Policy.