Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/kabisa-yili

Leap year

Medium 1000 ms 64 MB 42%
Share

A year number $y$ is given. Check whether the statement is true: “year $y$ is a leap year”. A year is a leap year if it is divisible by $4$ and not divisible by $100$, or divisible by $400$.

A calendar sheet and a leap-year mark

Input

One positive integer $y$.

Output

One integer: $1$ if the statement is true, otherwise $0$.

Note

$1 \le y \le 10^{9}$

Examples

Input #1
2024
Output #1
1
Input #2
2023
Output #2
0

Sign in to submit a solution

Signing up is free and takes a minute.