@Override
    public Object solve() {
        int count = 0;
        int weekday = 2; // 1 - 7 mapping to Mon - Sun, 1st Jan 1901 is a Tuesday
        for (int year = 1901; year <= 2000; year++) {
            for (int month = 0; month < 12; month++) {
                if (weekday == 7) {
                    count++;
                }
                weekday += getDaysInMonth(month, year) % 7;
                if (weekday > 7) {
                    weekday -= 7;
                }
            }
        }
        return count;
    }