Write a program that outputs 1 when the year is a leap year, otherwise 0. You can use any programming language, but use only assignments and arithmetic expressions for the calculation.
The Gregorian calender starts 1582.
Example of leap years:
Examples of common years:
The solutions in "Counting leap years" contain relational operators and conditions. These are not allowed here. The program must work correctly for all positive years.