Leap Year Check

E · easyP · Verified PYQmath

Given a year Y, determine whether it is a leap year or not. Rules: Divisible by 4 AND (not divisible by 100 OR divisible by 400).

Input
2024
Output
YES
if (Y%4==0 and Y%100!=0) or (Y%400==0): print YES else NO
← LCM of Two NumbersLinear Search →
Report an issue with this question