#K7776. Leap Years Finder

    ID: 34936 Type: Default 1000ms 256MiB

Leap Years Finder

Leap Years Finder

Given two integers start_year and end_year, your task is to print all the leap years between them (inclusive). A year is a leap year if it satisfies the formula: \(year \mod 4 = 0\) and (\(year \mod 100 \neq 0\) or \(year \mod 400 = 0\)).

For example, when the input is 2000 2020, the output should be 2000 2004 2008 2012 2016 2020.

inputFormat

The input contains two integers separated by space or newline:

  • start_year: The beginning of the range.
  • end_year: The end of the range.

outputFormat

Print the leap years found in the interval [start_year, end_year] on a single line separated by a single space. If no leap years are found, print an empty line.

## sample
2000 2020
2000 2004 2008 2012 2016 2020

</p>