We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Guys If you are using python, beware of using datetime module to solve this problem. Code will fail on test case 4th and beyond because datetime.date() function gives 'year is out of range error' on large values of year. and if year further exceeds 2^31 - 1, it gives 'python int too large to convert to C long' error.
Project Euler #19: Counting Sundays
You are viewing a single comment's thread. Return to all comments →
Guys If you are using python, beware of using datetime module to solve this problem. Code will fail on test case 4th and beyond because datetime.date() function gives 'year is out of range error' on large values of year. and if year further exceeds 2^31 - 1, it gives 'python int too large to convert to C long' error.