Files
python-tests/leap_year.py
2025-09-03 00:12:36 +08:00

10 lines
253 B
Python

#!/usr/bin/env python3
def is_leap_year(year: int):
return year % 4 == 0 and year % 100 != 0 or year % 400 == 0
if __name__ == "__main__":
print(1582, is_leap_year(1582))
print(2000, is_leap_year(2000))
print(2100, is_leap_year(2100))