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.
For Python (or not) people struggling with TC 3 & 4 ...
Use this test case :
146991212471011
You should end up with 18. I made 2 mistakes:
- I was counting sundays for 2801 years instead of 2800 ...
- I was inverting years after mod 2800, which completely broke things in some case where year1 was less than year2 but mod1 was more than mod2
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #19: Counting Sundays
You are viewing a single comment's thread. Return to all comments →
OMGGGGGG
For Python (or not) people struggling with TC 3 & 4 ...
Use this test case :
You should end up with 18. I made 2 mistakes: - I was counting sundays for 2801 years instead of 2800 ... - I was inverting years after mod 2800, which completely broke things in some case where year1 was less than year2 but mod1 was more than mod2