#B3846. Sum of Leap Years Excluding Boundaries
Sum of Leap Years Excluding Boundaries
Sum of Leap Years Excluding Boundaries
Given two years, compute the sum of all leap years strictly between them (i.e., not including the starting year and the terminal year).
A year is considered a leap year if it satisfies the following condition: \( (\text{year} \bmod 4 = 0 \text{ and } \text{year} \bmod 100 \neq 0) \) or \( \text{year} \bmod 400 = 0 \).
inputFormat
The input consists of two integers separated by a space representing the starting year and the ending year.
outputFormat
Output the sum of all leap years strictly between the two given years.
sample
2000 2020
8040