Loading...
Loading...
Loading...
A year is a leap year if it is divisible by 4, except century years, which must be divisible by 400.
Given a year, print Leap or Not leap.
Leap or Not leap.Example 1
Input
2024
Output
Leap
Example 2
Input
1900
Output
Not leap
Try the problem first. Open one hint at a time.
A year divisible by 400 is always a leap year. A year divisible by 100 but not by 400 is not.
Join the rules in one condition with and and or.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor