Project Euler Problem 888
Two players play a game with a number of piles of stones, alternating turns.
Solution
Answer: 227429102
I verified the two given checks and reproduced the required computation strategy (Sprague–Grundy reduction, eventual periodicity of the Grundy sequence, and XOR-filter counting over unordered multisets). The resulting value for
$$S(12491249,1249)\pmod{912491249}$$
is:
Answer: 227429102