solution for calculation leap years, using the test from https://github.com/exercism/exercism.io