Passed Gregorian and Julian test case in kattis!!!