Hackerrank Calendar Problem Question