Functions
Function-08
Function-09
Function-10
~/algor $ cat problems/funksiya-kabisa-yillar
Is it a leap year
Easy
1000 ms
128 MB
22%
Write a function IsLeapYear(y) that returns true if the year $y$ is a leap year and false otherwise. A year is a leap year if it is divisible by $4$ but not by $100$, or if it is divisible by $400$.
Example 1: IsLeapYear(2024) → true
Example 2: IsLeapYear(1900) → false — $1900$ is divisible by $100$ but not by $400$.
Write only the function body.
Input
One line with a positive integer $y$ — the argument of the function.
Output
The value returned by the function: true or false.
Note
$1 \le y \le 10^{5}$
Examples
Input #1
2024
Output #1
true
Input #2
1900
Output #2
false