3 ms·
There are at least two algorithms. The one you outline here feels more like the one I use (and, coincidentally, Art Benjamin[0][1][2] uses), whereas Conway use
by ColinWright 7y ago
There are at least two algorithms. The one you outline here feels more like the one I use (and, coincidentally, Art Benjamin[0][1][2] uses), whereas Conway used one of his own devising called the Doomsday Algorithm[3].
So you're right, it's not that hard, but be aware that you may not be thinking of the algorithm Conway used.
[0] https://en.wikipedia.org/wiki/Arthur_T._Benjamin https://en.wikipedia.org/wiki/Arthur_T._Benjamin
[1] https://math.hmc.edu/benjamin/ https://math.hmc.edu/benjamin/
[2] https://www.ted.com/talks/arthur_benjamin_a_performance_of_mathemagic https://www.ted.com/talks/arthur_benjamin_a_performance_of_m...
[3] https://en.wikipedia.org/wiki/Doomsday_rule https://en.wikipedia.org/wiki/Doomsday_rule