3 ms·
I don't see it there: https://archive.org/details/boris-a.-kordemsky-the-moscow-puzzles-1972/ https://archive.org/details/boris-a.-kordemsky-the-moscow-pu... D
by bumbledraven 2y ago
I don't see it there: https://archive.org/details/boris-a.-kordemsky-the-moscow-puzzles-1972/ https://archive.org/details/boris-a.-kordemsky-the-moscow-pu...
Do you recall the solution? It seems like a tricky problem. No approach occurs to me aside from a brute force analysis of the 400 year Gregorian calendar cycle, accounting for the complete leap year rules (under which, e.g., 1900 was not a leap year but 2000 was).
- bumbledraven 2y agoIt turns out that New Year's Day is a bit more likely to fall on Sunday than Saturday. To confirm, here's a bit of simple JavaScript that checks a complete 400-year cycle. You can run it in your browser's console: const counts = Array(7).fill(0); for (let year = 2000; year < 2400; year++) { counts[new Date(year, 0, 1).getDay()]++; } console.log(`Number of Saturdays: ${counts[6]}; Number of Sundays: ${counts[0]}`); Output: Number of Saturdays: 56; Number of Sundays: 58 Note: getDay() returns 0 for Sunday and 6 for Saturday (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getDay https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...).