Leap Year Check
Mediumjava
A year is a leap year if it is divisible by 4 and not by 100, or if it is divisible by 400.
Input: one integer — the year.
Output: one line — Leap or Not leap.
Example 1
Input
2000
Output
Leap
Example 2
Input
1900
Output
Not leap
- 1 <= year <= 100000
Hint 1
Translate the rule directly into && and ||.
Hint 2
Use parentheses to group the "divisible by 4 and not by 100" part.
The rule is a single boolean expression: (divisible by 4 AND not by 100) OR (divisible by 400). 2000 passes via the divisible-by-400 clause; 1900 fails both clauses.